Generally speaking we recommend having no more than 150 incoming live streams per instance of Wowza Streaming Engine. You are likely ingesting RTSP camera feeds and connecting to them all at the same time will put a large load on your server.
You can configure the startupStreamsDelayTime property in Wowza Streaming Engine Manager / Server / Vhost setup / Properties / Custom. Once there add the information, save it, and restart Wowza Streaming Engine for it to take effect. The value is in milliseconds. In this case it will wait ten seconds before connecting to the next camera in your Startup Streams.
Path: /Root/Vhost
Name: startupStreams
DelayTimeValue: Integer
Value: 16000
This should help with a more gradual ramp up of resources on start.
When a camera is disconnected it will continue to try to reconnect over and over again. You can change the amount of time that specific camera will wait to reconnect by using the rtspConnectionTimeout value. I would recommend increasing the time before Wowza Streaming Engine attempts to connect to your cameras.
https://www.wowza.com/docs/How-to-specify-per-stream-settings-in-stream-files#rtspstreams
From the article:
- rtspConnectionTimeout: Integer
Specifies, in milliseconds, the TCP connection timeout for making the initial TCP connection to an IP camera. For more details, see RTP Session Properties Description.
Default: 8000
I would double that value as a starting point. Please remove any and all RTSP sources that are no longer in use.
You can also modify the wait time at the application level if you do not wish to modify every single stream file by hand as shown above. To do that, please go to Wowza Streaming Engine Manager / Server / Vhost Setup / Properties / Custom. Once there add the information, save it, and restart Wowza Streaming Engine for it to take effect.
Path: /Root/Application/MediaCaster
Name: reconnectWaitTime
Type: Integer
Value: 10000
You may also have a memory issue due to your RTSP camera sources being unreachable at times. You can gather information on this by using the following commands.
cat wowzastreamingengine_access* | grep Cannot\ connect > cannot.log
cat cannot.log | cut -f9 | cut -d " " -f8 | sort | uniq > uniq.log
Disconnect issues mean that the source is not available for reasons such as the camera is turned off, the network that the camera is on is down, there is a massive problem between the camera network and your network (that is outside anybodies control), or your server is overloaded and crashing due to too many cameras being offline.
You would see the crashing issue manifest if your Wowza Heap, technically a Java Heap as Wowza Streaming Engine is built on Java, grows over time and does not reduce in size. Once it hits maximum size the server will crash. Increasing the size of the Heap would only delay the inevitable.
If the information above does not resolve your problem then please enter a ticket through your Wowza account portal.
https://store.wowza.com/portal/account