Results 1 to 5 of 5

Thread: Please help fixing OutOfMemoryError

  1. #1
    Join Date
    Oct 2011

    Default Please help fixing OutOfMemoryError


    We have developed plug-in that receives H264 frames from custom source and publishes it into Wowza.
    And it has been working fine for quite some time, but now we got memory problems when receiving multiple concurrent RTSP stream start/stop requests.

    I have noticed that memory usage is proportional to the growing number of connections in JConsole.
    Could you please explain what are these connections and why they stay even after I close all clients?

    You can see there are 47 connections while actually there are only 15 (and probably not RTP).
    Last edited by Xeon[13]; 02-05-2014 at 03:09 AM.

  2. #2
    Join Date
    Oct 2011


    Also here is heap dump report

  3. #3
    Join Date
    May 2013


    It seems like the highlighted entries in your netstat screenshot may not be associated with your Wowza instance and the heap dump does show quite a few references but in total size/space its not really a significant number. You might try a thread dump to see which threads are active/inactive to get a better idea on this front.

  4. #4
    Join Date
    Oct 2011


    Thank you for your reply, it was really helpful. And sorry for delaying with my answer.
    I've found several bugs in our code that led to a thread lock and now everything works much better.

    However, I was asked to recover Wowza whenever OutOfMemoryError occurs.
    So I added -XX:OnOutOfMemoryError option to setenv.bat:
    set JAVA_OPTS=%JAVA_OPTS% -XX:OnOutOfMemoryError="%WMSAPP_HOME%\bin\restart.bat"
    And it worked fine.

    But -XX:OnOutOfMemoryError option does not work when Wowza is run in service mode.
    I added this line to WowzaMediaServer-Service.conf and checked Java Args in logs:"%WMSAPP_HOME%\bin\restart.bat"
    What am I missing here?
    Why isn't -XX:OnOutOfMemoryError respected in service mode?

  5. #5
    Join Date
    Dec 2007


    I am not sure. If you have that WowzaMediaServer-Service.conf file in the /conf folder then you are using an older version of Wowza 3, and that is not included, and such settings are made in setenv.bat.


Similar Threads

  1. OutOfMemoryError For More Than Two Output Streams
    By odrilon in forum AddOn: Transcoder
    Replies: 3
    Last Post: 08-08-2013, 02:09 AM
  2. Fixing video stutter problem in handbrake encoded h.264 video's
    By janvandenberg in forum Live Streaming and Encoder Discussion
    Replies: 1
    Last Post: 12-14-2011, 11:59 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