ts_kmp_ctrl_read_timeout

The ts_kmp_ctrl_read_timeout directive sets a timeout limit for reading from the Kaltura Media Protocol controller socket.

Syntaxts_kmp_ctrl_read_timeout time;
Defaultnone
Contextstream, stream server
Arguments1

Description

The ts_kmp_ctrl_read_timeout directive is crucial for optimizing the performance and reliability of live streaming environments managed by the Kaltura Media Framework. By defining a timeout value, it helps mitigate the risk of hanging connections that may occur if a response from the Kaltura Media Controller is delayed or lost. Once the specified timeout is reached while attempting to read from the controller's socket, NGINX will terminate the operation, thereby freeing up resources and potentially allowing for recovery mechanisms to take place.

This directive can be particularly helpful in high-traffic or resource-constrained systems where prolonged read times may indicate issues, such as network latency or performance degradation. The timeout is specified in seconds, and it should be set based on the expected operational latency of the media streaming environment. Administrators may need to adjust the timeout parameter according to their specific use cases to balance availability and performance effectively.

When configured in the stream or stream server context, the ts_kmp_ctrl_read_timeout value influences how long the server will wait for a read operation to complete before considering it unsuccessful and proceeding with error handling routines to maintain service continuity.

Config Example

stream {
    server {
        listen 1935;
        ts_kmp_ctrl_read_timeout 30s;
    }
}

Ensure the timeout is not set too short, which can lead to frequent disconnections.

Test the directive under various load conditions to gauge optimal timeout settings.

← Back to all directives