Subject RE: [firebird-support] Re: Memory usage problems
Author William L. Thomson Jr.
On Sat, 2003-09-20 at 16:54, Robert DiFalco wrote:
> I may be wrong, but I am guessing that "gds__alloc: memory pool
> corrupted" is Firebird's response to running out of memory. This
> eventually results in your connection problem.

A out of memory error in that event would make more sense.

> This *can* be the result
> of many prepared-statements (or connections) that are never closed.

I am not using prepared statements at the moment, and at this moment the
maximum number of connections is 2.

I have gone back through all code and all statements, and result sets
are closed. I am in auto commit mode so it's not a committing issue.

In further detail it's a POS app with a POS interface and back end
management interface to monitor the data or POS system.

The front end is not in auto commit mode works as expected placing very
little load and consuming very little memory. It's mainly do inserts
with very little selects and no updates. With commits and rollbacks.

The back end is only using select statements in auto commit mode.

I have run the POS app for many hours straight with no problems. When I
run the back end management software within minutes I start to see
Firebird use more and more memory.

Once I close the management software and connection, the memory
consumption stops but the consumed memory is never released. Not until
Firebird is restarted.

So something does not seem write at all. The memory should be released
after some period of times. Currently there is around 50Mb in use for
two days now with no activity. It was in the 30Mb range prior to running
the management software a few days ago. Which increased it to just under

The errors reported only show up as the machine runs out of memory.

I am not sure if this is normal operation or a bug, but I really need to
find out why Firebird is consuming and not release memory.

> However, I've also heard it being the result of using certain UDF
> libraries. Are you using any of these, say FreeUDF? I found this, which
> may or may not be relevant:

I am not using any UDF's and I am running Firebird on a single proc
system. So it's not a SMP SS issue.

The only other thing I can think of may be a problem in JayBird. However
is it normal operation for the resources consumed by a connection to not
be freed after the connection is closed? Like several days after.

William L. Thomson Jr.
Support Group
Obsidian-Studios, Inc.