scgi_ignore_client_abort

The `scgi_ignore_client_abort` directive controls whether NGINX ignores client abort events when processing SCGI requests.

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

Description

The scgi_ignore_client_abort directive is used within the NGINX configuration to specify the behavior of the server when a client connection is aborted while processing a request destined for a SCGI backend. When set to 'on', NGINX will continue to process the request and respond to the backend server, even if the client has disconnected. This can be useful in scenarios where the backend processing should not be affected by an uninterested client, allowing for better resource utilization on the backend server. When set to 'off', NGINX will cease processing the request upon detecting that the client has aborted the connection, which can reduce resource usage but might lead to incomplete backend processing for requests where the client disconnects prematurely.

The directive accepts a single argument, either 'on' or 'off', allowing users to easily toggle this behavior. It can be placed in the context of 'http', 'server', or 'location', providing flexibility depending on the desired scope of configuration. It's essential to evaluate how this directive interacts with other settings in your NGINX configuration, particularly those concerning request handling and backend response management.

Config Example

server {
    listen 80;
    location /scgi {
        scgi_pass backend;
        scgi_ignore_client_abort on;
    }
}

Setting this directive to 'on' can lead to unnecessary load on your backend if many clients abort connections.

Ensure that the backend can handle requests without client feedback, as it might not be able to manage incomplete requests properly.

← Back to all directives