worker_rlimit_core

Sets the core file size limit for worker processes.

Syntaxworker_rlimit_core size;
Defaultnone
Contextmain
Arguments1

Description

The worker_rlimit_core directive is used to set the maximum size of core files created by worker processes in NGINX. A core file is a file that captures the memory image of a running process when it crashes. This directive allows NGINX administrators to specify how large the core dump files can be for debugging and analysis purposes. The value specified in this directive directly corresponds to the ulimit setting for core dumps, enabling effective resource management and facilitating easier troubleshooting during development or production error scenarios.

By specifying a non-zero numeric value, admin can configure the core size limit to suit their requirements. However, keep in mind that setting an excessively large core file size may consume considerable disk space, especially in environments with high process crash rates. On the other hand, setting it to zero disables core dumps entirely, which may hinder debugging efforts when issues arise. It is generally advisable to set a limit that balances the ability to capture valuable debugging information while managing disk resource utilization efficiently.

This directive must be defined in the main context of the NGINX configuration file and is typically set in a global configuration file, such as nginx.conf. Administrators must ensure they have appropriate permissions to modify core file generation settings and should consider their operating systems' limitations and configurations regarding core dump files when utilizing this directive.

Config Example

worker_rlimit_core 512M;

Disabling core dumps by setting it to 0 can make troubleshooting issues more difficult.

Setting an excessively large core size can consume significant disk space if many processes crash.

Ensure the user running NGINX has permissions to write core files to the specified location.

← Back to all directives