# Max length of time for an HLS live stream? Running out of memory after 24-48 hours

**URL:** https://community.wowza.com/t/max-length-of-time-for-an-hls-live-stream-running-out-of-memory-after-24-48-hours/94934
**Category:** Wowza Streaming Engine
**Created:** [May 10, 2022, 8:06pm UTC](https://community.wowza.com/t/max-length-of-time-for-an-hls-live-stream-running-out-of-memory-after-24-48-hours/94934 "2022-05-10T20:06:18Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Dan\_Farrow](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@Dan\_Farrow](https://community.wowza.com/u/Dan_Farrow)
#### Post date: [May 10, 2022, 8:06pm UTC](https://community.wowza.com/t/max-length-of-time-for-an-hls-live-stream-running-out-of-memory-after-24-48-hours/94934/1 "2022-05-10T20:06:18Z")

</div>

I am trying to leave a RTMP stream converting to HLS up for over 24 hours but I am running out of heap memory. Is there a limit on how long of a live stream is supported? Is it a typical use case to leave a live stream up indefinitely? I have looked at the docs on heap memory and such, but my question is what is the max length of time for a live stream?

---

<div class="post-metadata">

### Author: ![Karel\_Boek](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/karel_boek/32/454_2.png) [@Karel\_Boek](https://community.wowza.com/u/Karel_Boek)
#### Post date: [May 11, 2022, 11:47am UTC](https://community.wowza.com/t/max-length-of-time-for-an-hls-live-stream-running-out-of-memory-after-24-48-hours/94934/2 "2022-05-11T11:47:20Z")

</div>

This must be something with your stream, with the setup of your server or with any optional custom plug-ins. Theoretically you should be able to run RTMP -\> HLS live streams indefinitely; there’s no reason why it should crash because of Heap Size issues.

- Do you have a server with reasonable specs and have you set the Performance Tuner to Production (default after installation is Development Mode if I remember correctly)?
- Have you made any custom changes to the server or Application (e.g. HLS chunk size, playlist size, etc.)?
- Are you using any 3rd party plug-ins or modules?

---

<div class="post-metadata">

### Author: ![Dorota\_Szafer-Kwasik](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/dorota_szafer-kwasik/32/1150_2.png) [@Dorota\_Szafer-Kwasik](https://community.wowza.com/u/Dorota_Szafer-Kwasik)
#### Post date: [May 11, 2022, 7:15pm UTC](https://community.wowza.com/t/max-length-of-time-for-an-hls-live-stream-running-out-of-memory-after-24-48-hours/94934/3 "2022-05-11T19:15:11Z")

</div>

I confirm.  
We keep several dozen streams running 24 hours a day - no problems.  
We use custom modules.  
Hardware and configuration - check it.

---

<div class="post-metadata">

### Author: ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)
#### Post date: [May 13, 2022, 4:24pm UTC](https://community.wowza.com/t/max-length-of-time-for-an-hls-live-stream-running-out-of-memory-after-24-48-hours/94934/4 "2022-05-13T16:24:50Z")

</div>

Here are some tips on how to tune your server and local environment for optimal performance and have enough memory.

[https://www.wowza.com/docs/tune-wowza-streaming-engine-for-optimal-performance](https://www.wowza.com/docs/tune-wowza-streaming-engine-for-optimal-performance)

* * *

Take a peek at this [FAQ article](https://support.wowza.com/hc/en-us/articles/1260803160709-Why-is-My-Engine-Server-Crashing-) too for some additional Java tuning tips:
