ossrs / srs

SRS is a simple, high-efficiency, real-time video server supporting RTMP, WebRTC, HLS, HTTP-FLV, SRT, MPEG-DASH, and GB28181.

Home Page:https://ossrs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

After enabling http-flv, SRS often exits automatically.

jiangzhibin opened this issue · comments

The current version being used is SRS 2.0 with http-flv. After running the command "./objs/srs -c conf/http.flv.live.conf" for a while, it will unexpectedly exit (this situation occurs frequently). There are no relevant logs in the srs.log file.

To compile, use the command "./configure --with-ssl --with-hls --with-ssl --with-nginx --with-http-server --with-http-api --with-http-callback && make".

Configuration file:
listen 1935;
max_connections 1000;
srs_log_tank file;
srs_log_file ./objs/srs.log;
http_server {
enabled on;
listen 8080;
dir ./objs/nginx/html;
}
vhost defaultVhost {
http_remux {
enabled on;
mount [vhost]/[app]/[stream].flv;
hstrs on;
}

}

In the srs.log file, it can be seen that a few minutes ago the streaming was being pushed normally. When the streaming cannot be pushed, it is found that srs has already exited. Checking the srs.log file, there are no relevant logs indicating the exit of srs.

You can try running the command "ulimit -c unlimited" and then running srs. After srs exits, switch to the root directory and execute "find / -name core.*" to check if there is a core file for srs.

Is there any way to determine the cause of the automatic exit?

(It has been tested that when not using http-flv and using the configuration "./configure --with-ssl --with-hls --with-nginx --with-http-callback && make" with the hls.conf configuration to start srs, srs runs very stable and the above problem has not occurred.)

TRANS_BY_GPT3

Where are the versions and logs?

TRANS_BY_GPT3

commented
I also encountered this phenomenon, and version 2.0.219 also had this problem. The specific testing process is as follows:
The client sends an RTMP stream (rtmp://channellive.ds.com/live/test2) to the SRS server and stops for 30 seconds.

SRS destructed srssource. When the client sends another RTMP stream (rtmp://channellive.ds.com/live/test2) to the SRS server, if there is an HTTP-FLV request (http://channellive.ds.com:8080/live/test2.flv), the program throws an error, and the error is located at line 486 of the srs_app_http_stream.cpp file (using a released source pointer).
if ((ret = source->create_consumer(NULL, consumer, true, true, !enc->has_cache())) != ERROR_SUCCESS)
)

TRANS_BY_GPT3

Let's take a look.

TRANS_BY_GPT3

Fixed by 4f09bcc in 2.0.220