Results 1 to 2 of 2
Thread: heap overflow
- 11-17-2009, 10:24 PM #1Member
- Join Date
- Nov 2009
- Rep Power
Hi everyone..i m new to this forum...
I recently created a project to Capture and extract details from TCP packets (using JnetPcap Library).....for this i used multi-threading.....one thread captures the data-packet and puts it into an array-bounded queue...and the 2nd thread takes a packet from the queue and processes it for information.....
Now my problem is that i ran this program on a server and after running for about 6-7 hours it crashed giving "Java Heap Overflow Error".....even though i resized the heap to about 1GB :eek:........also, before crashing it stops printing any info about the packets taken from the queue and does almost nothing for about one hour and then crashes.....
I haven't used synchronization anywhere in the program...should i use that.??
Where from might i be getting that error....and why the hell does the program stop working after 4-5 hours.....about 2 hours before crashing....:confused:..??
Plz guys its urgent....can anyone help me regarding this...????
- 11-17-2009, 10:43 PM #2
Sounds like you have a memory leak somewhere... after you process the data do you clear it from memory or just it just keep accumulating until you run out of memory? Or, are you collecting more data then you can process and it backlogs until you run out of memory?My Hobby Project: LegacyClone
- By gayathri_g in forum New To JavaReplies: 12Last Post: 09-10-2009, 08:45 AM
- By fullmetaljacket in forum New To JavaReplies: 0Last Post: 05-19-2009, 07:49 PM
- By ravinda in forum New To JavaReplies: 6Last Post: 05-05-2009, 05:07 PM
- By Martin in forum New To JavaReplies: 0Last Post: 01-15-2009, 11:03 AM
- By rosh72851 in forum New To JavaReplies: 11Last Post: 10-15-2008, 09:01 PM