Skip to content

RTMP server gets stuck if ever more than 1000 simultaneous connections #4339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
darintay opened this issue May 4, 2025 · 3 comments
Open
Labels
EnglishNative This issue is conveyed exclusively in English.

Comments

@darintay
Copy link

darintay commented May 4, 2025

Describe the bug
If there are ever 1000+ RTMP simultaneous connections, no future connections will ever be accepted (until restart).

Version
Tested with docker releases 5.0-r2, 5.0-r3 and 6.0-a2.

To Reproduce

  • Run srs with rtmp server.
  • Run: for x in {0..1000}; do timeout 5s nc localhost 1935 & done; wait;
  • Observe in logs 1000 lines of ...RTMP client ip=127.0.0.1:39708, fd=420 followed by 1000 lines of client disconnect peer. ret=1008
  • Try repeating the command above, or any RTMP connection; note that no more RTMP client logs show up at all, streams cannot be sent

Also note, if you use 999 instead of 1000, then it appears to work fine, you can run the loop as many times as you want and the server does not break.

Expected behavior
Even if the maximum connections are exceeded, I expect once they are disposed those slots will be usable and future connections will work.

@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label May 4, 2025
@duiniuluantanqin
Copy link
Member

Please revise the following configuration

max_connections     1000;

@darintay
Copy link
Author

darintay commented May 9, 2025

The issue is not that there is a limit.

The bug is that if you ever hit the limit, the server breaks such that even if old connections finish, no new connections are ever accepted.

@duiniuluantanqin
Copy link
Member

duiniuluantanqin commented May 9, 2025

Oh, if what you say is true, then it's indeed a bug, we need to confirm it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EnglishNative This issue is conveyed exclusively in English.
Projects
None yet
Development

No branches or pull requests

3 participants