ajp_send_timeout

The `ajp_send_timeout` directive sets the timeout period for sending a request to the AJP backend server.

Syntaxajp_send_timeout time;
Defaultnone
Contexthttp, server, location
Arguments1

Description

The ajp_send_timeout directive is utilized in NGINX configuration to define the time duration allowed for sending a request to an AJP (Apache JServ Protocol) backend server. This timeout helps to prevent resources from being held indefinitely if the backend server does not respond within the expected time frame. Any connections that exceed this specified timeout period will be closed, allowing for better resource management and avoiding potential deadlocks or bottlenecks in request handling.

The directive takes one parameter, which is a time value defined in the format of either seconds (s), minutes (m), or hours (h). For example, a value of 30s would imply that NGINX will allow a maximum of 30 seconds for the send operation to complete before considering it a failure. Setting this value too low may lead to premature timeouts during high latency situations while setting it too high could potentially exhaust resources waiting for a backend response.

This directive is configurable in the context of http, server, or location, thus allowing flexibility based on the scope of the resolution required, whether it is for a global setting or for a specific route where a particular timeout strategy is needed.

Config Example

location /api {
    ajp_pass backend;
    ajp_send_timeout 30s;
}

Make sure to set appropriate timeout values based on expected network latency to avoid unintentional connection drops.

This directive only affects requests to AJP backends, not regular HTTP proxied connections.

If using in nested contexts, verify that it does not conflict with timeout settings in the parent context.

← Back to all directives