WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  OutofMemoryError in WAS 6

    Posted 08/11/10 10:37 AM
    OutofMemoryError in WAS 6

    --------------------------------

    Hi All,

    I've an application where I generate a report and export it to excel. The list is quite huge and contains more than 8000 records. But while generating the report I'm getting the below mentioned error. Can anybody please help me with this.

    Uncaught exception thrown in one of the service methods of the servlet: Exception thrown : java.lang.OutOfMemoryError
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.(ZipFile.java:203)
    at java.util.zip.ZipFile.(ZipFile.java:234)
    at com.ibm.ws.classloader.SinglePathClassProvider$2.run(SinglePathClassProvider.java:242)
    at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:63)
    at com.ibm.ws.classloader.SinglePathClassProvider.getClassBytesFromJar(SinglePathClassProvider.java:233)
    at com.ibm.ws.classloader.SinglePathClassProvider.getClassBytes(SinglePathClassProvider.java:178)
    at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java:457)
    at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:389)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)


    Note: My server heap size is, Initial: 128mb Maximum: 512mb, WAS version 6.1.0.15 , SunOS, version 5.9, Java version = 1.5.0_13

    1. Is the volume of records causing this OutOfMemoryError? If so, then I have another report too where I get around 9000 records, but I don't get OutofMemoryError!
    2. Is there any other alternative than increasing the heap size?

    --------------------------------

    Posted By: sunilkb at Jul 16 2009 4:12PM


  • 2.  OutofMemoryError in WAS 6

    Posted 08/11/10 10:45 AM
    OutOfMemory Error.

    --------------------------------

    Hi ,

    You can try the below procedure,

    java.lang.OutOfMemoryError:

    This error occurs when thousands of threads are started in very quick succession (almost simultaneously). The error indicates that the upper limit on the number of concurrent threads for the JVM has been reached. Normally this error occurs when a Javascript loop starts thousands of threads in a very short period of time. This error should not occur in normal conditions in which TDI solutions usually operate. You can avoid this error by inserting a very small delay between starting successive threads (even as small as 1 millisecond). This delay can cause performance to decrease a little, but the error would disappear. This is just an temporary fix.

    Permenant fix is go for fixpack 25. Please refer the below IBM site.
    www-01.ibm.com/support/docview.wss?rs=40...

    Thanks,
    Morgan

    --------------------------------

    Posted By: Morgan at Jul 20 2009 7:59AM


  • 3.  OutofMemoryError in WAS 6

    Posted 08/11/10 10:54 AM
    If you haven't opened a PMR with IBM, it is recommended. Out Of Memory errors seem pretty common and they're very quick at replying back to you. Just make sure you run the MustGather tool in ISA to capture everything IBM asks for. Additionally, since you've received this error you should consider turning on Verbose GC as it may shed some light on the issue.

    I've been investigating an OOM on WAS 6.1 FP 15 on a Windows OS. I opened a PMR and received the below reply from IBM which seems to have eliminated the error in our scenario (running a teradata application.)

    I don't know if it will help, but it might be worth a look.


    There is a known issue of native leak in direct bytebuffers in websphere
    versions 6.0.2 and 6.1. Please have a look at below link for more
    information.

    www-01.ibm.com/support/docview.wss?uid=s...


    As in above link, set 'com.ibm.ws.webcontainer.channelwritetype' to
    'sync' as webcontainer custom property and restart the server.

    And we also recommend to ensure below.

    1. If you have different sizes for webcontainer thread pool, change it
    to same. For example, min/max equal to 50/50.

    This will control the native memory usage at each thread create and
    destroy.

    2. If you are using Type 2 JDBC drivers, please consider switching to
    Type 4 as Type 2 consume a lot of native memory.

    --------------------------------

    Posted By: hunter at Jul 21 2009 3:51PM