CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2002
    Location
    Seattle Area, WA
    Posts
    241

    Java.lang.OutOfMemory exception

    I have a data logging app that recieves messages from any other app connected to it and logs the messages that the connected parties send to it.

    Of course it can't log all the messages simultaneously, and they messages come in at an unknown (random) fashion. Therefore the logging app, buffers them and stores them to the disk file as quickly as it can.

    I was stress testing this overnight last night and received this Java.lang.OutOfMemory exception when I came in. It effectively killed me logger app. I'm guessing the messages came in too quickly and the buffer of messages got so big that it ran out of memory quicker than it could remove the messages as it wrote them to disk.

    Does anyone know this memory limit? Is this simply the Working Set Size that windows allocates, or is this a Java limit of memory that an app can allocate? Does anyone know what this limit is? Maybe I can work around it if I know the limit.

    Thanks in Advance.

  2. #2
    dlorde is offline Elite Member Power Poster
    Join Date
    Aug 1999
    Location
    UK
    Posts
    10,163
    If you type java -X at the command line, you should see the non-standard options list. Usually it contains options to set the initial and maximum heap sizes and the thread stack size (-Xms<size>, -Xmx<size>, and -Xmss respectively). For example, WebLogic Server 7 uses -Xms32m -Xmx200m by default.

    Software is hard... it needs to be softer.
    Please use &#91;CODE]...your code here...&#91;/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured