Atomikos Forum

High memory use atomikosThreadLocalConnection

I have found high memory use (about 94 Megabyte) of Atomikos during a loop with lots of single sql (about 8200) select statements. The code seems to run perfect, however memory usage is getting a bit of a problem with 40 concurrent users.

With Eclipse MAT I have found Atomikos stores every statement on the AtomikosThreadLocalConnection.statements arraylist. I also notice there is only a purge and no remove on this arraylist so it looks like it is suppose to grow like this but 94M for 8200 sql's looks very expensive.

Can you please help why Atomikos does what it does?

Thanks,

Edwin
Edwin Send private email
Tuesday, May 25, 2010
 
 
Hi,

What release are you referring to?

Thanks
Guy Pardon Send private email
Wednesday, May 26, 2010
 
 
I use 3.5.9, however I checked the source of the latest 3.6 version and your code around the super.AddStatement() looks a lot the same.
Edwin Send private email
Thursday, May 27, 2010
 
 
We had a big in pre-3.5.5 releases but since then there should be no problem, so 3.5.9 should work... I guess this is likely to be a configuration issue of some sort.
Guy Pardon Send private email
Thursday, May 27, 2010
 
 
Why are all my separate statements stored on the atomikosThreadLocalConnection object? Can you point me in a direction why this happesn?

We have an class called SQLExecutor in our application which controls the sql and database connections. It builds a connection using the Springs DataSourceUtil.getConnection with uses the AtomikosNonXADataSourceBean. I fire lots of different sql queries on separate new-ed PreparedStatement objects using 'new' Connection objects, and some how they all are landing on one atomikosThreadLocalConnection  object. I close every statement, connection and datasource.
Edwin Send private email
Thursday, May 27, 2010
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics