ts_mem_limit

The `ts_mem_limit` directive sets a memory limit for the Kaltura Media Framework's transcoding process in NGINX.

Syntaxts_mem_limit size;
Defaultnone
Contexthttp, server, location
Arguments1

Description

The ts_mem_limit directive is used within the Kaltura Media Framework to specify the maximum amount of memory (in bytes) that can be consumed by the Media Framework's transcoding process. This memory management capability is critical for optimizing resource usage on servers that may run multiple transcoding jobs simultaneously or be responsible for handling a significant load of streaming media. By setting a memory limit, server administrators can prevent excessive memory consumption that could lead to performance degradation or crashes caused by resource exhaustion.

This directive takes a single argument representing the memory limit. If the limit is reached, the transcoding process may be stopped or throttled, ensuring that the server remains responsive and stable. Setting this directive at various contexts such as http, server, or location allows for flexible configurations tailored to specific applications or sections of a web server.

When implemented correctly, ts_mem_limit can enhance the performance of media streaming applications by managing memory resources effectively. However, care should be taken to configure the limit appropriately based on the expected workload and available resources, as setting it too low may result in transcoding failures, while setting it too high could jeopardize the stability of the server environment.

Config Example

server {
    listen 80;
    server_name example.com;
    ts_mem_limit 512M;
}

Ensure the memory limit isn't set too low, as this can lead to transcoding failures.

The directive may not have an effect if the memory limit is already set by other means.

This directive is specific to Kaltura Media Framework; misuse in unrelated contexts may lead to errors.

← Back to all directives