srt_proxy_timeout
The `srt_proxy_timeout` directive sets the timeout for SRT proxy connections in the NGINX SRT module.
Description
The srt_proxy_timeout directive is used to configure the duration of time before an SRT connection is considered to have timed out. This setting is crucial for maintaining stable proxy connections, especially in environments where network interruptions may occur. The timeout value is specified in seconds and is an essential parameter to ensure that the connections do not remain indefinitely occupied if they are inactive, allowing for better resource management.
When a connection reaches the specified timeout duration without any data transfer activity, NGINX will automatically close the connection. This behavior helps to prevent resource exhaustion by ensuring that stale connections do not linger on the server. The timeout applies specifically to the connections that are established via the SRT protocol, making it particularly relevant in streaming scenarios where latency and connection reliability are paramount.
The directive is settable at the stream context level, meaning it can be configured globally for all SRT streams or overridden in individual server blocks for specific use cases. This flexibility allows for tailored timeout settings based on the needs of different streaming applications being served.
Config Example
stream {
server {
listen 5432;
srt_proxy_timeout 30s;
srt_proxy_pass srt://127.0.0.1:4321;
}
}Ensure that the timeout value is appropriate for your application needs; too low may terminate active connections, and too high may lead to resource exhaustion.
Verify that the directive is configured within the correct context (stream or server) to avoid misconfiguration.