liquidsoap icon indicating copy to clipboard operation
liquidsoap copied to clipboard

Stereotool

Open rgriep opened this issue 2 years ago • 9 comments

Hi,

I am testing and programming Liquidsoap 2.2.0 and Stereotool. It works temporary fine and the Liquidsoap crash without ny error. Trying to run it as an daemon doesn't work too. No stream.

The servere runs on Ubuntu 22/ 4 core, 8GB memory. Only as a test server before production output.

Processor use avg 53% memory 9% while running the Liquidsoap script with Stereotool.

I followed the instructions for Liquidsoap 2.20 an Stereotool.

What can be the problem?

Best regards, Robert

rgriep avatar Jun 18 '23 15:06 rgriep

Thanks for reporting.

Are you familiar with gdb? You should be able to obtain a stack trace this way:

gdb /path/to/liquidsoap
> r <options>
.... crash
> thread apply all bt

Thanks!

toots avatar Jun 19 '23 23:06 toots

Thank you, I will try it out

rgriep avatar Jun 20 '23 08:06 rgriep

Hey @rgriep did you found a solution? I think that I'm experiencing the same problem. @toots I'm using the docker image to run Liquidsoap, is there a way to obtain the logs using gdb as well?

speniti avatar Aug 26 '23 12:08 speniti

@speniti yes absolutely, just install gdb inside the container.

toots avatar Aug 26 '23 16:08 toots

I think that I found the issue, it was the enable_replaygain_metadata that was slowly increasing memory usage until the max. I have just removed it and everything seems working fine now with an almost constant memory usage. Hope this can help you @rgriep.

speniti avatar Aug 31 '23 09:08 speniti

Thanks for finding this @speniti. I'm gonna have a pass at this memory increase with enable_replaygain_metadata. How fast was the memory increasing?

toots avatar Aug 31 '23 22:08 toots

Not so fast, in my case the container has the memory limited to 1280MB, just after starting Liquidsoap was using ~40/43% of it and the usage was increasing ~1% per hour, so something like ~12MB/h. After removing the enable_replaygain_metadata call, the memory usage is stable around ~45/46%.

Also CPU usage has changed, before I was seeing some spikes above the 100% (I have 2vCPUs available), now seems more stable around the ~40/60%.

I don't have any useful graph to show at the moment since I still have to configure CloudWatch properly, sorry.

speniti avatar Sep 01 '23 07:09 speniti

@speniti CPU spikes are expected. The replaygain method does have to decode files when the metadata is not available and this will consume CPU. We introduced a ratio parameter in https://github.com/savonet/liquidsoap/commit/be75b6ec4c9ed56fba93be0c5e396d382e99c615 that should allow for a finer control of the spikes but they are unfortunately required for the functionality.

toots avatar Sep 01 '23 13:09 toots

Ah, ok gotcha! Thanks, I wasn't aware of the ratio parameter.

speniti avatar Sep 01 '23 13:09 speniti