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...????
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?