You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to report was I think maybe is a bug as an issue, but since I can't recreate it, asking here for any ideas first:
MediaMTX version
v1.11.0
Issue:
I have a server running MediaMTX listening on a public internet IP on port 1935 for RTMP connections, and two IP cams that are connecting and publishing video. I have a short runOnConnect Python script that does some checks once a new connection is made and kicks any unwanted streams using the API.
In the logs I see a fair bit of closed: invalid rtmp version (71) and closed: invalid rtmp version (22), which I think are attempts to establish http or https connections.
Usually the connection is just closed with no issue. But in this case the CPU usage on the server immediately jumped to 100% and stayed there until I restarted mediamtx a couple of hours later.
The server is quite over-sized for the task. Nothing else is running and usually with the two streams connected it's at around 2% CPU usage.
It was one thread in particular, and in my monitoring tool I can see the PID of the specific thread that was using up the CPU (1513823) and there is nothing in the logs written from that thread.
Logs
Jan 18 02:25:32 rtmp-server mediamtx[1995]: 2025/01/18 02:25:32 INF [RTMP] [conn 18.189.11.103:47190] opened
Jan 18 02:25:32 rtmp-server mediamtx[1995]: 2025/01/18 02:25:32 INF [RTMP] [conn 18.189.11.103:47190] runOnConnect command started
Jan 18 02:25:32 rtmp-server mediamtx[1995]: 2025/01/18 02:25:32 INF [RTMP] [conn 18.189.11.103:47190] closed: invalid rtmp version (22)
Jan 18 02:25:32 rtmp-server mediamtx[1995]: 2025/01/18 02:25:32 INF [RTMP] [conn 18.189.11.103:47190] runOnConnect command stopped
Jan 18 02:25:36 rtmp-server mediamtx[1995]: 2025/01/18 02:25:36 INF [RTMP] [conn 18.189.11.103:52942] opened
Jan 18 02:25:36 rtmp-server mediamtx[1995]: 2025/01/18 02:25:36 INF [RTMP] [conn 18.189.11.103:52942] runOnConnect command started
Jan 18 02:25:36 rtmp-server mediamtx[1995]: 2025/01/18 02:25:36 INF [RTMP] [conn 18.189.11.103:52942] closed: invalid rtmp version (71)
Jan 18 02:25:36 rtmp-server mediamtx[1995]: 2025/01/18 02:25:36 INF [RTMP] [conn 18.189.11.103:52942] runOnConnect command stopped
Jan 18 02:25:37 rtmp-server mediamtx[1995]: 2025/01/18 02:25:37 INF [RTMP] [conn 18.189.11.103:52956] opened
Jan 18 02:25:37 rtmp-server mediamtx[1995]: 2025/01/18 02:25:37 INF [RTMP] [conn 18.189.11.103:52956] runOnConnect command started
Jan 18 02:25:37 rtmp-server mediamtx[1995]: 2025/01/18 02:25:37 INF [RTMP] [conn 18.189.11.103:52956] closed: invalid rtmp version (22)
Jan 18 02:25:37 rtmp-server mediamtx[1995]: 2025/01/18 02:25:37 INF [RTMP] [conn 18.189.11.103:52956] runOnConnect command stopped
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'd like to report was I think maybe is a bug as an issue, but since I can't recreate it, asking here for any ideas first:
MediaMTX version
v1.11.0
Issue:
I have a server running MediaMTX listening on a public internet IP on port 1935 for RTMP connections, and two IP cams that are connecting and publishing video. I have a short
runOnConnect
Python script that does some checks once a new connection is made and kicks any unwanted streams using the API.In the logs I see a fair bit of
closed: invalid rtmp version (71)
andclosed: invalid rtmp version (22)
, which I think are attempts to establish http or https connections.Usually the connection is just closed with no issue. But in this case the CPU usage on the server immediately jumped to 100% and stayed there until I restarted mediamtx a couple of hours later.
The server is quite over-sized for the task. Nothing else is running and usually with the two streams connected it's at around 2% CPU usage.
It was one thread in particular, and in my monitoring tool I can see the PID of the specific thread that was using up the CPU (
1513823
) and there is nothing in the logs written from that thread.Logs
Beta Was this translation helpful? Give feedback.
All reactions