Viks, > My app is running out of [memory]. > > Code does a lot of string opeartion. It involves fetching records > from DB.
[snip] > 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. Do you have everything in one big method? If so, you might be collecting local variables that cannot be GC'd, and so you're essentially leaking memory. I assume your program is something of the form: conn = getConnection ps = conn.prepareSatement rs = ps.executeQuery while(rs.next) { // Do some stuff } Do you retain any data across each of the loop iterations? For example, are you keeping an array/map/list/whatever of information around that includes data from each row? If so, you may be simply running out of memory. Do you know what the memory settings are for your JVM? -chris
signature.asc
Description: OpenPGP digital signature