Subject Re: [IBO] Blob Handling consumes memory
Author Helen Borrie
At 01:07 PM 21/02/2004 +0100, you wrote:
>Working with: IBO 4.4Aa, D7, FB 1.0.3.972, W2K
>I have an application where I store documents as binary blob in the DB.
>Now I noticed that both
>...LoadFromFile(FileName) as well as ...SaveToFile(Filename) keep
>consuming memory which is only
>released when either the application disconnects from the DB or is closed
>altogether. When I read
>files totaling 20 MB into the DB, memory consumption of my app. rises by
>20 MB.
>
>I prepared a simple test case to send it to Jason to have a look. To my
>surprise, the test
>application does not consume memory. So I changed it to work against my
>original DB.
>Here, it does consume memory again ...
>
>Where does that leave me? Can any setting of the DB have such an effect on
>the client? What can I
>test to further isolate the culprit?
>I followed Tony Caduto's thread with a similar problem but his solution
>didn't help in my case.

Are you sure? What happens when you reach the limit of the cache size? Do
you still see "memory growth" after that?

What are the cache sizes on the two machines (the one that is shedding the
committed blobs vs the one that is retaining them?

>I have tried explicid transaction handling with a hard commit after each
>new record, no effect...

With big blobs it's a good rule anyway, to start-trans/perform
operation/commit every time, not just to ensure that the blob really gets
written but also to make sure that old blobs get garbage collected. (blobs
are never updated, always replaced. The old version of the blob stays on
disk but it won't get garbage-collected if you autocommit).

Helen