We am using ffmpeg with nginx rtmp module to simply remux the rtmp stream and push to another application in the same nginx.conf. Running on: Ubuntu 20.04 LTS (GNU/Linux 5.4.0-26-generic x86_64)
We are getting random errors logged in the nginx debug log like this (due to which ffmpeg does not push the stream because ffmpeg could not start):
2021/09/18 15:58:52 [info] 2324903#0: 25319 exec: starting managed child '/usr/local/bin/dash.sh', client: xxx.xxx.4.34, server: 0.0.0.0:1935
2021/09/18 15:58:52 [info] 2324903#0: 25319 exec: fork failed (12: Cannot allocate memory), client: xxx.xxx.4.34, server: 0.0.0.0:1935
Note that this does not happen every time we give an input stream to nginx rtmp on port 1935. This happens randomly - and as ffmpeg does not start due to the memory error - the stream does not get pushed.
The RAM / Swap files etc are more than 90% FREE when this error occurs, so this does not appear to be memory related.
Our nginx.conf is as follows, we are using ffmpeg to just remux the rtmp stream and push it from live_abc application to dashout_xyz:
We am using ffmpeg with nginx rtmp module to simply remux the rtmp stream and push to another application in the same nginx.conf. Running on: Ubuntu 20.04 LTS (GNU/Linux 5.4.0-26-generic x86_64)
We are getting random errors logged in the nginx debug log like this (due to which ffmpeg does not push the stream because ffmpeg could not start): 2021/09/18 15:58:52 [info] 2324903#0: 25319 exec: starting managed child '/usr/local/bin/dash.sh', client: xxx.xxx.4.34, server: 0.0.0.0:1935 2021/09/18 15:58:52 [info] 2324903#0: 25319 exec: fork failed (12: Cannot allocate memory), client: xxx.xxx.4.34, server: 0.0.0.0:1935
Note that this does not happen every time we give an input stream to nginx rtmp on port 1935. This happens randomly - and as ffmpeg does not start due to the memory error - the stream does not get pushed.
The RAM / Swap files etc are more than 90% FREE when this error occurs, so this does not appear to be memory related.
Our nginx.conf is as follows, we are using ffmpeg to just remux the rtmp stream and push it from live_abc application to dashout_xyz:
user root;
user nginx root;
user ffmpeg root;
user nobody;
worker_processes 1;
worker_processes auto;
error_log logs/error_error.log error; error_log logs/error_debug.log debug; error_log logs/error_notice.log notice; error_log logs/error_warn.log warn;
error_log logs/error.log info;
worker_rlimit_nofile 65536;
pid logs/nginx.pid;
events { use epoll; worker_connections 4096; multi_accept on; }
rtmp_auto_push on; rtmp_auto_push_reconnect 1s; rtmp_socket_dir /tmp/sock;
rtmp { server { listen 1935;
} #rtmp
http {
} # http
Request any help/hints as to what the issue is or how do we go about finding out what the issue is.