Answer the question
In order to leave comments, you need to log in
NGINX+RTMP periodically crashes, maybe something is wrong in the config?
NGINX with the RTMP module freezes periodically, the video stream is still being sent to the server, but the statistics and the player are empty, only manually restarting NGINX helps.
I can’t understand what the problem might be, a similar config on the NGINX Windows assembly works stably.
Debian 8 is currently running on the server.
#user nobody;
worker_processes 4;
error_log logs/error.log debug;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 8081;
server_name localhost;
# sample handlers
location /on_play {
if ($arg_pageurl ~* (http://******/|http://******/)) {
return 200;
}
return 403;
}
#location /on_publish {
# return 201;
#}
#location /vod {
# alias /var/myvideos;
#}
# rtmp stat
location /stat {
rtmp_stat all;
rtmp_stat_stylesheet stat.xsl;
}
location /stat.xsl {
# you can move stat.xsl to a different location
root /usr/local/nginx/conf;
}
# rtmp control
location /control {
rtmp_control all;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
rtmp_auto_push on;
rtmp {
server {
listen 1935;
ping 30s;
notify_method get;
application live {
live on;
# sample play/publish handlers
on_play http://localhost:8081/on_play;
#on_publish http://localhost:8080/on_publish;
# sample recorder
#recorder rec1 {
# record all;
# record_interval 30s;
# record_path /tmp;
# record_unique on;
#}
# sample HLS
#hls on;
#hls_path /tmp/hls;
#hls_sync 100ms;
}
# Video on demand
#application vod {
# play /var/Videos;
#}
# Video on demand over HTTP
#application vod_http {
# play http://localhost:8080/vod/;
#}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question