ossrs / srs

SRS is a simple, high-efficiency, real-time media server supporting RTMP, WebRTC, HLS, HTTP-FLV, HTTP-TS, SRT, MPEG-DASH, and GB28181.
https://ossrs.io
MIT License
25.87k stars 5.39k forks source link

SRS5 WHEP have memory leaks #4155

Closed hskent closed 3 months ago

hskent commented 3 months ago

Describe the bug When using WHEP for playback, memory usage increases over time.

Version 5.0.210

To Reproduce

listen              1935;
max_connections     1000;
srs_log_tank        file;
srs_log_file        ./logs/srs.log;
daemon              on;
http_api {
    enabled         on;
    listen          1985;
}
http_server {
    enabled         on;
    listen          8080;
    dir             ./objs/nginx/html;
}
rtc_server {
    enabled on;
    listen 8000; # UDP port
    candidate $CANDIDATE;
}
vhost __defaultVhost__ {
    min_latency     on;
    mr {
        enabled     off;
    }
    mw_latency      1000;
    http_remux {
        enabled     on;
        mount       [vhost]/[app]/[stream].flv;
    }
    rtc {
        enabled     on;
        # @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtmp-to-rtc
        rtmp_to_rtc on;
        # @see https://ossrs.net/lts/zh-cn/docs/v4/doc/webrtc#rtc-to-rtmp
        rtc_to_rtmp off;
    }
}

Using the test tool: https://github.com/Softvelum/ whep-load-tester

./whep_loader -whep-addr "http://SRS_SVR:1985/rtc/v1/whep/?app=live&stream=test" -whep-sessions 10

Expected behavior Memory consumption increases over time as user sessions continue.

Screenshots image image

winlinvip commented 3 months ago

This is a known issue where the Source in SRS 5 was not cleaned up. The issue has been resolved in version 6.0. There have already been several issues reported about this, so please refrain from submitting duplicate issues.

TRANS_BY_GPT4