ant-media / Ant-Media-Server

Ant Media Server is a live streaming engine software that provides adaptive, ultra low latency streaming by using WebRTC technology with ~0.5 seconds latency. Ant Media Server is auto-scalable and it can run on-premise or on-cloud.
https://antmedia.io
Other
4.23k stars 619 forks source link

RTMP endpoint stucks internalls #3337

Open mekya opened 3 years ago

mekya commented 3 years ago

Short description

We have an app that as soon a streams starts it republishes to 2 output locations, one to nimble and the other one to an internal Ant App. After a few days (so a lot of streams went by) some of the streams on the internal app show as broadcasting even they are not, as the original incoming stream was no longer there. So we had 20 incoming streams, but over 100 republished in the internal app, which makes no sense. when you try to watch those "stuck" streams, obviously it's not possible

Environment

Steps to reproduce

  1. Send more than 30 WebRTC streams to a server (WebRTCAppEE)
  2. Add an RTMP endpoint for each stream that forwards the incoming stream to an another internal application (LiveApp)
  3. Stop the WebRTC streams (WebRTCAppEE)

Expected behavior

Streams in LiveApp should be deleted

Actual behavior

Streams in LiveApp stucks there

Logs

https://www.dropbox.com/s/aa6gnehfmb4aehp/rtmp_stuck_media_log.zip?dl=0

Join Google Group and be a part of Ant Media Server Community.

golgetahir commented 3 years ago

Hi all,

I have been testing this issue on following scenarios:

1) Server A adds endpoint for server B 2) Same server's WebRTCAppEE adds endpoints for LiveApp 3) Also tested with high CPU usage like over 95%

The issue did not created any of the scenarios, if there are specific stream IDs in the given logs it would help very much because it is really really hard to compare the streams one by one if it is deleted or not since there are more than 2gb of logs.

Cheers.