Question

memory-leak on radio server

Posted February 9, 2021 359 views
NginxUbuntu 20.04DigitalOcean Droplets

Just trying to run icecast2 server on Ubuntu 20.04 droplet (2GB) with liquidsoap. However, every 3 days or so the free-memory drops down to < 100Mb or so causing the radio to stop streaming. Don’t want to keep rebooting every 3-4 days or even go down to Ubuntu 18.04. Any suggestions will be helpful.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
2 answers

Hello, @jossshe

I will recommend you to add swap space on the droplet if this is not done yet. Also you can check for any out of memory references in the logs and check for killed processes as well.

You can check our tutorial on how to add swap space:

https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-20-04

To trace any killed processes you can run this command:

grep -i kill /var/log/messages

and to trace any OOM (out of memory):

grep -i oom /var/log/messages

If you can see out of memory references in the log you can try to tweak the configuration and optimize it if possible. The other option will be to upgrade the memory of the droplet as well.

Hope that this helps!
Regards,
Alex

by Brian Boucheron
One way to guard against out-of-memory errors in applications is to add some swap space to your server. In this guide, we will cover how to add a swap file to an Ubuntu 20.04 server.

Hi there,

In addition to what Alex mentioned already, I could also suggest making sure that you are running the latest version of icecast2 so that if there are any memory leaks in the older versions, they might have been patched in the newer ones.

Regards,
Bobby