Description
The version number of the SRS being tested is 2.0.239.
Configuration File
Source configuration file origin.conf
listen 19350;
max_connections 1000;
daemon off;
#srs_log_level verbose;
srs_log_tank console;
pid ./objs/origin.pid;
vhost __defaultVhost__ {
}
Edge 1 configuration file edge1.conf
listen 1935;
max_connections 1000;
pid objs/edge1.pid;
daemon off;
srs_log_level info;
#verbose;
srs_log_tank console;
vhost __defaultVhost__ {
mode remote;
origin 127.0.0.1:19350;
}
Edge 2 configuration file
listen 19358;
max_connections 1000;
pid objs/edge2.pid;
daemon off;
srs_log_level info;
#verbose;
srs_log_tank console;
vhost __defaultVhost__ {
mode remote;
origin 127.0.0.1:19350;
}
Test Steps
- Edge 1 only pushes the stream, and Edge 2 only pulls the stream. To confirm whether it is a push leak or a pull leak, separate the push and pull streams.
- Push different streams to Edge 1. The script for pushing on Ubuntu is as follows:
#!/bin/bash
i=
for((;;)); do \
ffmpeg -re -i 200kbps.768x320.100s.flv \
-vcodec copy -acodec copy \
-f flv -y rtmp://192.168.149.128/live/livestream$i; \
sleep 1; \
i=`expr $i + 1`
done
Test Steps
3. Continuously pull changing streams from Edge 2 and the source end.
Results
The SRS version number is 2.0.239. When cleaning and closing the SrsSource, it was found that Edge 2's memory was increasing much faster than the source end. Later, after enabling the cleaning of SrsSource, it was observed that the memory of the source end and Edge 1 stopped increasing, while Edge 2's memory increased by 1M every half an hour. The memory did not decrease after stopping the stream. It remained constant.
It was confirmed that the pool size of Edge 2's SrsSource did not keep increasing and was eventually cleaned. Additionally, even after adding 803 to STATISTIC: Cleanup stream when closed #803, the memory leak issue remained the same. It seems that there might be other memory leaks in the stream pulling part of the edge.
Currently, there are no clear clues, so if anyone can help take a look, it would be greatly appreciated. Thank you~
TRANS_BY_GPT3