Outofmemory error'pls help..!!!!!!!

At one point in my program, I performing calculations on number of rows(~600,000). I use JSP & JAVA. Here are some things I noticed.

1. It's very slow! :-)

2. Initially, the cpu monitor shows a high level of cpu utilisation, but this slowly drops off with a blip every second or so. Basically, things slow down as the process chugs along.

3. I eventually get a java.Lang.OutOfMemory exception after approx 1:00 -1:30 hrs.

I tried running the JVM with heap size set to 256 Mbytes. I still get the outof mem error.

Is there a faster/better way? Any ideas on how I can get rid of the out of mem errors.....?

I tried searching in the forum for similar kind of discussions but..could n't get the solution for it..Pls help...!!!

[785 byte] By [briskrook] at [2007-9-26 14:24:21]
# 1
Hi, I don't know if you are using a CellRenderer, but i faced a similar Problem (some months ago).Perhaps this give you a hint to find your error. http://forum.java.sun.com/thread.jsp?forum=57&thread=164731Hope this helps.Greetings Michael
Urmech at 2007-7-2 16:06:07 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2
Hi,i am having a similar problem. Have you found any solution.ThanksRegardsvenkat
bvkn at 2007-7-2 16:06:07 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 3
Can you please tell how you are storing data and what type of data is it. So, we can try to help.Regards,Ashish
shrimalashish at 2007-7-2 16:06:07 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 4

Hai. thanks for your reply.

The system creates many threads, (around 1000). Each thread either gets some data thru' net or connects to a local database to get some info and does some complex calculations on that. The data type is mostly String and Vector's.

I am getting this error when the number of thread goes beyond 900.

Again thanks for your interest.

bvkn at 2007-7-2 16:06:07 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 5
Increase the java heap space via the command line.Keep in mind that 1000 threads is probably a lot and you might want to look at a thread pool.
jschell at 2007-7-2 16:06:07 > top of Java-index,Java HotSpot Virtual Machine,Specifications...