kmp_cc_in_read_timeout
The 'kmp_cc_in_read_timeout' directive configures the timeout period for reading input from Kaltura Media Protocol connections.
Description
The 'kmp_cc_in_read_timeout' directive is used within the context of Kaltura Media Framework's NGINX module to specify the duration, in seconds, that the server should wait for input on a connection before timing out. This directive is particularly useful in scenarios involving media streaming, where connection stability and responsiveness are critical. If the read operation exceeds the designated timeout period, NGINX will close the connection to prevent resource exhaustion and to maintain performance stability.
When utilizing the 'kmp_cc_in_read_timeout' directive, it requires a single integer argument that represents the timeout duration in seconds. The directive is effective in both 'stream' and 'stream server' contexts and can be adjusted depending on the anticipated latency of the connections being handled. For example, a value of 30 would mean that after 30 seconds of inactivity on a KMP connection, the server will terminate that connection.
The behavior of this directive is crucial for optimizing the responsiveness of live media streams. A very short timeout might lead to frequent disconnections during periods of minor latency, while an excessively long timeout could tie up server resources in inactive connections. Administrators should consider the typical use case scenarios when configuring this directive to ensure a balance between connection persistence and resource management.
Config Example
stream {
server {
kmp_cc_in_read_timeout 60;
}
}Setting the timeout too low may cause premature disconnections during normal operation intervals.
If not set, the default of 30 seconds may not be sufficient for some network conditions, particularly in high-latency environments.