Results 1 to 2 of 2

Thread: heap overflow

  1. #1
    is0dvil is offline Member
    Join Date
    Nov 2009
    Posts
    1
    Rep Power
    0

    Unhappy heap overflow

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

  2. #2
    mrmatt1111's Avatar
    mrmatt1111 is offline Senior Member
    Join Date
    Aug 2009
    Location
    San Jose, CA, USA
    Posts
    320
    Rep Power
    5

    Default

    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

Similar Threads

  1. Heap memory
    By gayathri_g in forum New To Java
    Replies: 12
    Last Post: 09-10-2009, 08:45 AM
  2. Java Stack Overflow?
    By fullmetaljacket in forum New To Java
    Replies: 0
    Last Post: 05-19-2009, 07:49 PM
  3. [SOLVED] overflow when calculate factorial
    By ravinda in forum New To Java
    Replies: 6
    Last Post: 05-05-2009, 05:07 PM
  4. How i get a JVM Heap information ?
    By Martin in forum New To Java
    Replies: 0
    Last Post: 01-15-2009, 11:03 AM
  5. Graphics2D: stack overflow error
    By rosh72851 in forum New To Java
    Replies: 11
    Last Post: 10-15-2008, 09:01 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •