limit_conn_log_level

The `limit_conn_log_level` directive sets the log level for connection limit exceeded errors.

Syntaxlimit_conn_log_level level;
Defaultnone
Contexthttp, server, location
Arguments1

Description

The limit_conn_log_level directive is utilized to define the logging level for events where the number of connections exceeds the allowed limit, as specified by the limit_conn directive. This can help in debugging and monitoring, as it allows administrators to determine the severity of the situation by adjusting how verbose the logs should be.

The directive accepts a single argument representing the log level, which can be one of the pre-defined NGINX log levels such as error, warn, info, notice, etc. Depending on the chosen level, different amounts of information regarding the connection limit violation will be logged, which can be useful for operational insights and diagnostic purposes.

By setting this directive within different contexts such as HTTP, server, or location blocks, you can have granular control over how connection limit issues are logged across various parts of your web application. This targeted logging can assist in identifying specific issues at different levels of your web server's architecture.

Config Example

http {
    limit_conn_zone $binary_remote_addr zone=addr:10m;
    limit_conn addr 10;
    limit_conn_log_level warn;
    # Other settings...
}

Ensure the log level you set is appropriate for the environmental context, as a too verbose level may fill up log files quickly.

Be aware that setting log level too low may obscure important error messages you may need for analysis.

← Back to all directives