Results 1 to 2 of 2

Thread: java.lang.OutOfMemoryError: Java heap space

  1. #1

    Default java.lang.OutOfMemoryError: Java heap space

    This bug has bitten me twice in the last month. Any idea what could be causing this? Wowza Media Server 3.0.3.08 build959 on EC2, Amazon Linux AMI release 2011.09, small instance.

    2012-06-23 01:36:31 UTC - - - - - - - - - 2.292 - - - - - - - - - - - - - - - - - - - - - - - - -java.lang.OutOfMemoryError: Java heap space
    at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57)
    at java.nio.ByteBuffer.allocate(ByteBuffer.java:329)
    at org.apache.mina.common.SimpleByteBufferAllocator.allocate(Unknown Source)
    at org.apache.mina.common.ByteBuffer.allocate(Unknown Source)
    at org.apache.mina.transport.socket.nio.SocketIoProcessor.read(Unknown Source)
    at org.apache.mina.transport.socket.nio.SocketIoProcessor.process(Unknown Source)
    at org.apache.mina.transport.socket.nio.SocketIoProcessor.access$600(Unknown Source)
    at org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(Unknown Source)
    at org.apache.mina.util.NamePreservingRunnable.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:636)


    My setenv.sh contains:
    _EXECJAVA=java
    JAVA_OPTS="-Xmx1000M -server"


    WMSAPP_HOME=/usr/local/WowzaMediaServer
    WMSCONFIG_HOME=/usr/local/WowzaMediaServer
    WMSCONFIG_URL=
    VARJAVAMAXHEAPSIZE=1000M
    GCOPTIONS="-XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:NewSize=128m -verbose:gc -Xloggc:"/usr/local/WowzaMediaServer/logs/gc.log" -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC"


    export WMSAPP_HOME WMSCONFIG_HOME JAVA_OPTS _EXECJAVA GCOPTIONS VARJAVAMAXHEAPSIZE

  2. #2
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Are setting java heap size to 1000m because you have limited ram and/or a 32bit system? That is not very high for a production server. I suggest getting a 64bit server with 4 - 8 gigs of ram, then setting java heap size accordingly.

    Also, as noted in the tuning guide, avoid these custom GC options by default. Review step #6 in the tuning guide.

    Richard

Similar Threads

  1. Unexpected exception.: java.lang.OutOfMemoryError: Java heap space
    By sriv.mayank in forum Performance and Tuning
    Replies: 1
    Last Post: 03-26-2014, 02:40 PM
  2. Replies: 9
    Last Post: 07-03-2013, 08:31 AM
  3. Error: java.lang.OutOfMemoryError: Java heap space
    By Denis_Ukraine in forum Server Administration Discussion
    Replies: 5
    Last Post: 05-20-2013, 03:32 PM
  4. Wowza failed after 10 days - java.lang.OutOfMemoryError: Java heap space
    By tribalhost in forum Performance Tuning Discussion
    Replies: 5
    Last Post: 04-10-2013, 06:30 AM

Posting Permissions

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