Subject | Re: [Firebird-Java] Memory Leek with Statement Pooling |
---|---|
Author | Roman Rokytskyy |
Post date | 2004-10-03T13:23:27Z |
Hi,
statements open even after connection.close(), because otherwise performance
improvement is not so big.
(e.g. we have LRU policy for connection caching). When you ask for a new
connection, you get connection where no statements were prepared. In your
case your memory will grow until all connections are used at least once (min
is 5, max is 30).
will add it to my todo list for 1.6. If I get time to fix it in 1.5.x, I
will add it there too.
Roman
> If i create a report with many different statements used memory isCorrect. If I'm not wrong, this fix was added as you suggested to keep
> growing. (Thats normal i thing, because the statements are cached)
> After creating the report the connection is given back to the pool.
> Memory is not given back.
statements open even after connection.close(), because otherwise performance
improvement is not so big.
> And this happens every time i create the same report, so i think theWhen connection is released back to pool it is added to the end of the queue
> statement are not used again the the cache is growing and growing.
(e.g. we have LRU policy for connection caching). When you ask for a new
connection, you get connection where no statements were prepared. In your
case your memory will grow until all connections are used at least once (min
is 5, max is 30).
> If i setStatementPooling(false) and comment out the 4 lines after itMore or less correct. You release statement each time you close it.
> the memory is not growing, not for the first time i create the
> report and not for creation after that.
> I hope this can be fixed and is not a normal effect for statementWe need to add a pooling policy (LRU vs MRU). This is not 5 min. hack, I
> pooling, because i think the pooling really makes my application
> faster.
will add it to my todo list for 1.6. If I get time to fix it in 1.5.x, I
will add it there too.
Roman