tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RES: Out Of Memory - String Operation
Date Fri, 28 Jul 2006 19:06:15 GMT
I faced the same problem once and solved it by closing resultsets,
statments, setting them to null and forcing garbage colletor from inside my

try speading out "System.gc();" in estrategic points of your application.

-----Mensagem original-----
De: Viks []
Enviada em: sexta-feira, 28 de julho de 2006 08:33
Assunto: Out Of Memory - String Operation

  My app is running out of app.
  Code does a lot of string opeartion.It involves fetching records from DB
  Initially i was using string objects- Program used to finish in about
40-45 min with ~95 cpu usage 
  We did some optimization on the code like changing the query from String
to StringBuffer.
  This has improved the execution time and cpu usage.
  For 60k records the prog ran fine ....execution time improved from 30 mins
to around 4 min and cpu usage from 95 % to 15%.
  For around 100k records my apps goes down on memory.
  Wondering if the app is able to sustain on String Obj why it is going down
with StringBuffer Objects.

 Here's a new way to find what you're looking for - Yahoo! Answers 

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message