# Wowza Heap and Memory is getting full

**URL:** https://community.wowza.com/t/wowza-heap-and-memory-is-getting-full/44340
**Category:** Wowza Streaming Engine
**Created:** [November 27, 2014, 3:59pm UTC](https://community.wowza.com/t/wowza-heap-and-memory-is-getting-full/44340 "2014-11-27T15:59:07Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![Ionatan\_Popescu](https://avatars.discourse-cdn.com/v4/letter/i/e9bcb4/32.png) [@Ionatan\_Popescu](https://community.wowza.com/u/Ionatan_Popescu)
#### Post date: [November 27, 2014, 3:59pm UTC](https://community.wowza.com/t/wowza-heap-and-memory-is-getting-full/44340/1 "2014-11-27T15:59:07Z")

</div>

Hello,

We are running WowzaStreamingEngine 4.0.4. We are using Java 1.8.0\_05, Java Heap Size is set to “Production” level.

We reload Wowza service daily but every few days Wowza service is out of memory even if the number of connection is low. How can we identify what is causing this?

Thank you,

I. P.

---

<div class="post-metadata">

### Author: ![sal\_jefferson](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sal\_jefferson](https://community.wowza.com/u/sal_jefferson)
#### Post date: [November 27, 2014, 9:06am UTC](https://community.wowza.com/t/wowza-heap-and-memory-is-getting-full/44340/2 "2014-11-27T09:06:53Z")

</div>

Hello there and welcome to the Wowza support forum.

Do you see any errors in the logs?

Do you have any custom modules enabled? If so does removing them solve the issue?

Can you please provide your server specs, and tuning settings? Or are you using the “auto tune” feature?

[Performance Tuning](https://www.wowza.com/docs/general-tuning)

Is this a dedicated Wowza box? If not, it would help if it were.

Kind regards,

Salvadore

---

<div class="post-metadata">

### Author: ![Daren\_Johnson](https://avatars.discourse-cdn.com/v4/letter/d/ee59a6/32.png) [@Daren\_Johnson](https://community.wowza.com/u/Daren_Johnson)
#### Post date: [December 2, 2014, 11:41pm UTC](https://community.wowza.com/t/wowza-heap-and-memory-is-getting-full/44340/3 "2014-12-02T23:41:32Z")

</div>

Hi,

This is now being handled in ticket #111073

Daren

---

<div class="post-metadata">

### Author: ![Jason\_Hilton](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/jason_hilton/32/437_2.png) [@Jason\_Hilton](https://community.wowza.com/u/Jason_Hilton)
#### Post date: [November 27, 2014, 9:57pm UTC](https://community.wowza.com/t/wowza-heap-and-memory-is-getting-full/44340/4 "2014-11-27T21:57:19Z")

</div>

Hi,

As you have tuned the server and you’re already using the “G1 (Garbage First) collector” which I would have recommended, please edit the [Wowza-Install]/conf/Tune.xml file to remove the comments “” from around the VMOptions/HeapDumpOnOutOfMemoryError which will create a heapdump when Wowza runs out of memory. The result should look like this.

```auto
<VMOption>-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="${com.wowza.wms.AppHome}/logs"</VMOption>

```

You will need to save the Tune.xml file after editing and restart Wowza for the changes to take effect.

After you have done this, wait until Wowza runs out of memory and it will create the heapdump which you will need to upload to a sharing site or FTP or web server for download and analysis.

Create a ticket with Wowza support by emailing support@wowza.com

When creating a ticket please attach a ZIP file which contains the following directories and files:

[Wowza-Install]/conf/

[Wowza-Install]/logs/

[Wowza-Install]/transcoder/

[Wowza-Install]/manager/logs/

Please make sure you provide logs which show Wowza server starting.

If you are not sure how to get this information please see the following tutorial.

[How to create a compressed zip file in Windows, OS X, and Linux](https://www.wowza.com/docs/how-to-create-a-compressed-zip-file-in-windows-os-x-and-linux)

As for the other message, please see it below followed by the cause.

WARN server comment LiveMediaStreamReceiver.doWatchdog: streamTimeout: Resetting connection

Cause: Wowza can’t connect to a MediaCaster stream. It could be a problem with the network or a problem with the source. For example, the camera was reached, but rejected the connection. Wowza will continue trying to reconnect until the stream is available again.

You can use the [How to troubleshoot error messages article](https://www.wowza.com/docs/how-to-troubleshoot-error-messages) for referencing common messages in the error log.

Regards,

Jason

---

<div class="post-metadata">

### Author: ![Bora\_Erbas](https://avatars.discourse-cdn.com/v4/letter/b/8797f3/32.png) [@Bora\_Erbas](https://community.wowza.com/u/Bora_Erbas)
#### Post date: [January 3, 2015, 12:34am UTC](https://community.wowza.com/t/wowza-heap-and-memory-is-getting-full/44340/5 "2015-01-03T00:34:23Z")

</div>

Hello All,

Has there been a conclusion after this point? Is there a known memory leak in Wowza 4?

We are also experiencing a possible memory leak. Should we open a new case or can you update this thread?

Regards,

Bora.

---

<div class="post-metadata">

### Author: ![Andrew\_Kennedy1](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@Andrew\_Kennedy1](https://community.wowza.com/u/Andrew_Kennedy1)
#### Post date: [January 3, 2015, 6:19am UTC](https://community.wowza.com/t/wowza-heap-and-memory-is-getting-full/44340/6 "2015-01-03T06:19:35Z")

</div>

Hi,

There are currently no known memory leaks in Wowza so please do open a support ticket if you are having issues.

Andrew

---

<div class="post-metadata">

### Author: ![Paul\_Shields](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/paul_shields/32/390_2.png) [@Paul\_Shields](https://community.wowza.com/u/Paul_Shields)
#### Post date: [March 17, 2016, 2:27pm UTC](https://community.wowza.com/t/wowza-heap-and-memory-is-getting-full/44340/7 "2016-03-17T14:27:54Z")

</div>

Hi,

The heap file in that case is generated when the Java JVM experiences an out of memory critical event. You can also trigger a heap dump if this is required. Please see [this article](https://www.wowza.com/docs/how-to-create-a-java-heap-dump-on-wowza-media-server) which shows a few methods to do this.

Paul

---

<div class="post-metadata">

### Author: ![Diogo\_Moraes](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@Diogo\_Moraes](https://community.wowza.com/u/Diogo_Moraes)
#### Post date: [March 11, 2016, 11:17am UTC](https://community.wowza.com/t/wowza-heap-and-memory-is-getting-full/44340/8 "2016-03-11T11:17:33Z")

</div>

> Hello,
> 
> I’ve removed comments for
> 
> in /conf/Tune.xml
> 
> This error occurred again, but I don’t see any new logs except access and error logs. Is this suppose to generate a new log file or are the errors added to existing logs?
> 
> Thank you,
> 
> Ionatan

I have followed the instructions given here, but I don’t see a heap dump file being created anywhere on my server. Can anyone help?

---

<div class="post-metadata">

### Author: ![Diogo\_Moraes](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@Diogo\_Moraes](https://community.wowza.com/u/Diogo_Moraes)
#### Post date: [March 17, 2016, 11:43am UTC](https://community.wowza.com/t/wowza-heap-and-memory-is-getting-full/44340/9 "2016-03-17T11:43:57Z")

</div>

I have followed the instructions on that article, to automatically create a heap dump on out of memory errors.

This is the error as it appears on the log:

WARN server comment 2016-03-10 22:59:48 - - - - - 641832.52 - - - - - - - - Unexpected exception.: java.lang.OutOfMemoryError: Java heap space|

WARN server comment 2016-03-10 22:59:48 - - - - - 641832.52 - - - - - - - - Unexpected exception.: java.lang.OutOfMemoryError: Java heap space|

And the heapdump file is nowhere to be seen. Is there any other configuration needed?

---

<div class="post-metadata">

### Author: ![Diogo\_Moraes](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@Diogo\_Moraes](https://community.wowza.com/u/Diogo_Moraes)
#### Post date: [March 21, 2016, 11:03am UTC](https://community.wowza.com/t/wowza-heap-and-memory-is-getting-full/44340/10 "2016-03-21T11:03:43Z")

</div>

I did follow that article, and my tune.xml file has this line uncommented:

-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="${com.wowza.wms.AppHome}/logs"

And still I see no heapdumps on that location.

---

<div class="post-metadata">

### Author: ![Ionatan\_Popescu](https://avatars.discourse-cdn.com/v4/letter/i/e9bcb4/32.png) [@Ionatan\_Popescu](https://community.wowza.com/u/Ionatan_Popescu)
#### Post date: [November 27, 2014, 6:57pm UTC](https://community.wowza.com/t/wowza-heap-and-memory-is-getting-full/44340/11 "2014-11-27T18:57:34Z")

</div>

Hello,

I’ve found this in logfile in the same timeframe when Wowza ran out of memory:

> Unexpected exception.: java.lang.OutOfMemoryError: Java heap space|at java.util.HashMap.keySet(HashMap.java:906)|at java.util.HashSet.iterator(HashSet.java:172)|at sun.nio.ch.EPollSelectorImpl.implClose(EPollSelectorImpl.java:144)|at sun.nio.ch.SelectorImpl.implCloseSelector(SelectorImpl.java:113)|at java.nio.channels.spi.AbstractSelector.close(AbstractSelector.java:111)|

Also these errors are in error log

> - 
> - 
> - 
> - 
> - LiveMediaStreamReceiver.doWatchdog: streamTimeout[…]: Resetting connection: […]
> 
> WARN server comment 2014-11-27 11:53:08 - - - - - 42463.098 - - - - - - - -

These are Performance Tuning settings:

_Memory_

_Total: 15.66 GB_

_Java Heap Size_

_Production level_

_10000 MB_

_Java Garbage Collection Settings_

_G1 (Garbage First) collector_

---

<div class="post-metadata">

### Author: ![Ionatan\_Popescu](https://avatars.discourse-cdn.com/v4/letter/i/e9bcb4/32.png) [@Ionatan\_Popescu](https://community.wowza.com/u/Ionatan_Popescu)
#### Post date: [December 1, 2014, 8:13am UTC](https://community.wowza.com/t/wowza-heap-and-memory-is-getting-full/44340/12 "2014-12-01T08:13:23Z")

</div>

Hello,

I’ve removed comments for

> -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=“${com.wowza.wms.AppHome}/logs”

in /conf/Tune.xml

This error occurred again, but I don’t see any new logs except access and error logs. Is this suppose to generate a new log file or are the errors added to existing logs?

Thank you,

Ionatan

---

<div class="post-metadata">

### Author: ![Michelle\_B](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/michelle_b/32/394_2.png) [@Michelle\_B](https://community.wowza.com/u/Michelle_B)
#### Post date: [March 21, 2016, 9:47am UTC](https://community.wowza.com/t/wowza-heap-and-memory-is-getting-full/44340/13 "2016-03-21T09:47:48Z")

</div>

Hi,

You can opt to generate a heap dump manually when you notice the heap increasing/peaking using the commands outlined in that post. Do you also see any hs\_err\_pid.log files in the bin/ directory?

Another option you can look into is to [run a JFR](http://docs.oracle.com/javacomponents/jmc-5-5/jfr-runtime-guide/index.html) on your Wowza instance. This is built-in to Java 8, and should be available for free when testing.

Michelle

---

<div class="post-metadata">

### Author: ![Andrew\_Ramberg](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@Andrew\_Ramberg](https://community.wowza.com/u/Andrew_Ramberg)
#### Post date: [March 21, 2016, 7:35am UTC](https://community.wowza.com/t/wowza-heap-and-memory-is-getting-full/44340/14 "2016-03-21T07:35:25Z")

</div>

Hello,

In the article [How to take a Java heap dump](https://www.wowza.com/docs/how-to-create-a-java-heap-dump-on-wowza-media-server), it mentions that the dump save location should be specified in your JAVA\_OPTS command. For example:

-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=[path-to-heapdump]

Where [path-to-heapdump] is the path to where the heap dump file is stored (such as /opt).

Best regards,

Andrew

---

<div class="post-metadata">

### Author: ![Florian\_Grundler](https://avatars.discourse-cdn.com/v4/letter/f/cc9497/32.png) [@Florian\_Grundler](https://community.wowza.com/u/Florian_Grundler)
#### Post date: [March 17, 2016, 10:43pm UTC](https://community.wowza.com/t/wowza-heap-and-memory-is-getting-full/44340/15 "2016-03-17T22:43:35Z")

</div>

Hello peers having low heap,

I am trying to narrow down this issue with heap space not getting reclaimed until OOM or service affect the server due to uneffective garbage collection at critical almost full level.

Do you have many or just a few channels INPUT?

Do you suffer signal losses between your headend/encoder and Wowza Streaming Engine (WSE)?

Please check “Incoming Streams” one by one whether uptime is same as application uptime and ideally server uptime (if yes, you would confuse my theory, if no you qualify to actually suffer from this issue)

What input decoder is your most popular?

Do you transcode any channels?

What ouput packetizer is your most popular one?
