ajp_ignore_client_abort

The `ajp_ignore_client_abort` directive controls whether NGINX should ignore client aborts when proxying requests to an AJP server.

Syntaxajp_ignore_client_abort on | off;
Defaultoff
Contexthttp, server, location
Argumentsflag

Description

The ajp_ignore_client_abort directive is employed in the context of NGINX when proxying requests using the AJP protocol. When this directive is enabled (set to on), NGINX will continue sending the request to the AJP backend even if the client has aborted the connection. This can be particularly useful for ensuring that long-running processes on the backend are not prematurely halted due to client disconnections, which can be a common occurrence in web applications with long response times or heavy processing workloads.

When set to off, the default behavior is for NGINX to stop sending the request to the backend as soon as the client disconnects. This behavior might be desirable in situations where resources should not be wasted on processing requests that no longer have a client to serve. The directive's value is a boolean flag, allowing for clear control over this behavior in various NGINX configuration contexts including http, server, and location.

Using this directive effectively requires understanding the impact on application performance and resource utilization, especially for backend services that may consume significant resources or processing time based on the type of requests they handle. This directive should be used with care, keeping in mind the specific application requirements and the typical client interaction patterns.

Config Example

location /app {
    ajp_pass tomcats;
    ajp_ignore_client_abort on;
}

Enabling this directive may lead to resource waste if clients disconnect frequently.

It requires careful management of backend resources to handle ongoing requests even after a client disconnects.

← Back to all directives