Subject | RE: [IB-Java] runaway process |
---|---|
Author | Ken Richard |
Post date | 2000-09-18T11:34:25Z |
I would never create statements in a tight loop, but I would keep a database
connection around for a long time inside a pool that is available to the web
server. Perhaps this is not a good simulation, but I still think that the
interserver should release the memory. And yes, I am sure that
interserver.exe is using memory.
Looking at the interserver.exe code, I have already found at least one
memory leak. I am not setup to compile interserver, so I can't fire up the
debugger to see if the leak I found is large enough to cause the problem.
Also - what is the cvs command line parameter to checkout the interclient
1.6?
-----Original Message-----
From: Helen Borrie [mailto:helebor@...]
Sent: Friday, September 15, 2000 11:34 PM
To: IB-Java@egroups.com
Subject: RE: [IB-Java] runaway process
At 02:05 PM 15-09-00 -0400, you wrote:
first, start a transaction, prepare the statement, go into your loop,
iterate right through the loop and commit the transaction at the end. The
effect of doing what the above code describes is to make the gap between
the OAT (oldest active transaction) and the current transaction ever
wider. That is what eats CPU time.
more like a problem of garbage accumulation in the database server. Having
thousands of uncommitted transactions sitting inside this looping process
completely prevents garbage collection.
As a rule of thumb, if you have an OAT gap which is greater than twice the
number of connections, you really need to take a serious look at the
architecture of your application...
Helen
All for Open and Open for All
InterBase Developer Initiative · http://www.interbase2000.org
___________________________________________________
Project JEDI · http://delphi-jedi.org
___________________________________________________
To unsubscribe from this group, send an email to:
IB-Java-unsubscribe@egroups.com
connection around for a long time inside a pool that is available to the web
server. Perhaps this is not a good simulation, but I still think that the
interserver should release the memory. And yes, I am sure that
interserver.exe is using memory.
Looking at the interserver.exe code, I have already found at least one
memory leak. I am not setup to compile interserver, so I can't fire up the
debugger to see if the leak I found is large enough to cause the problem.
Also - what is the cvs command line parameter to checkout the interclient
1.6?
-----Original Message-----
From: Helen Borrie [mailto:helebor@...]
Sent: Friday, September 15, 2000 11:34 PM
To: IB-Java@egroups.com
Subject: RE: [IB-Java] runaway process
At 02:05 PM 15-09-00 -0400, you wrote:
>I unsuccessfully tried to recreate the problem. However, I did notice thatthe
>interserver.exe seems to use a lot of memory when there are a large number
>of sql statements executed on a connection.
>
>The following code makes interserver.exe go to 31MB ram (according to win2k
>task manager). The memory is released when the connection is closed and
>interserver.exe process ends.In practice, you would never do this. You would set up the statement
>for i = 1 to 10000 {
> create statement
> statement.execute sql
> close statement
>}
first, start a transaction, prepare the statement, go into your loop,
iterate right through the loop and commit the transaction at the end. The
effect of doing what the above code describes is to make the gap between
the OAT (oldest active transaction) and the current transaction ever
wider. That is what eats CPU time.
>I was going to use interbase as the backend for a servlet web system - andbe
>implement a simple connection pooling class. This makes it look like only
>one statement should be created per connection - and the statement should
>cached in the pool with the connection. It looks like the statement memoryAre you sure that it is interserver that is eating the resources? It looks
>is never getting cleaned up in interserver.exe.
more like a problem of garbage accumulation in the database server. Having
thousands of uncommitted transactions sitting inside this looping process
completely prevents garbage collection.
As a rule of thumb, if you have an OAT gap which is greater than twice the
number of connections, you really need to take a serious look at the
architecture of your application...
Helen
All for Open and Open for All
InterBase Developer Initiative · http://www.interbase2000.org
___________________________________________________
Project JEDI · http://delphi-jedi.org
___________________________________________________
To unsubscribe from this group, send an email to:
IB-Java-unsubscribe@egroups.com