ant-media / Ant-Media-Server

Ant Media Server is a live streaming engine software that provides adaptive, ultra low latency streaming by using WebRTC technology with ~0.5 seconds latency. Ant Media Server is auto-scalable and it can run on-premise or on-cloud.
https://antmedia.io
Other
4.29k stars 636 forks source link

Circle recording issue after 30 minutes #6529

Closed mustafaboleken closed 2 months ago

mustafaboleken commented 3 months ago

While we are using the media push for recording, after some time we get the error below and the browser will crash in kubernetes. To solve this, I opened a pr to reduce the memory usage and if you are using the kubernetes, you can make the changes below.

ERROR:file_io_posix.cc(145)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)

mustafaboleken commented 3 months ago

Set the empty dir to increase the shared memory size

`spec: containers:

And set the shared memory size to min 2 GB

For the docker run:

--shm-size=2g

For the docker compose:

version: '3.5'
services:
  your_service:
    build:
      context: .
      shm_size: '2gb' <-- this will set the size when BUILDING
    shm_size: '2gb' <-- when RUNNING 
mekya commented 3 months ago

Hi @mustafaboleken I don't understand where to add --shm-size=2g. Could you just explain a little further?

mustafaboleken commented 3 months ago

Hi @mekya

I just updated the comment with more explanation.

mekya commented 3 months ago

Thank you @mustafaboleken

mustafaboleken commented 2 months ago

I tested the scenario with rooms where recording was enabled and there were 4 participants. From now on, when I refer to a 'room,' this is what I mean:

burak-58 commented 2 months ago

In Kubernetes deployment, please add followings as suggested here.

containers:
volumeMounts: