posix_setrlimit() constants


These constants are available starting with PHP 7.0.0. Please note that some of them may not be available on your system.


You may wish to read the below notes in conjunction with the manpage for setrlimit() on your specific operating system, as there is variance in how these limits are interpreted, even across operating systems that claim to implement POSIX in full.

The maximum size of the process's address space in bytes. See also PHP's memory_limit configuration directive.
The maximum size of a core file. If the limit is set to 0, no core file will be generated.
The maximum amount of CPU time that the process can use, in seconds. When the soft limit is hit, a SIGXCPU signal will be sent, which can be caught with pcntl_signal(). Depending on the operating system, additional SIGXCPU signals may be sent each second until the hard limit is hit, at which point an uncatchable SIGKILL signal is sent. See also set_time_limit().
The maximum size of the process's data segment, in bytes. It is extremely unlikely that this will have any effect on the execution of PHP unless an extension is in use that calls brk() or sbrk().
The maximum size of files that the process can create, in bytes.
The maximum number of locks that the process can create. This is only supported on extremely old Linux kernels.
The maximum number of bytes that can be locked into memory.
The maximum number of bytes that can be allocated for POSIX message queues. PHP does not ship with support for POSIX message queues, so this limit will not have any effect unless you are using an extension that implements that support.
The maximum value to which the process can be reniced to. The value that will be used will be 20 - limit, as resource limit values cannot be negative.
A value one greater than the maximum file descriptor number that can be opened by this process.
The maximum number of processes (and/or threads, on some operating systems) that can be created for the real user ID of the process.
The maximum size of the process's resident set, in pages.
The maximum real time priority that can be set via the sched_setscheduler() and sched_setparam() system calls.
The maximum amount of CPU time, in microseconds, that the process can consume without making a blocking system call if it is using real time scheduling.
The maximum number of signals that can be queued for the real user ID of the process.
The maximum size of the process stack, in bytes.
Used to indicate an infinite value for a resource limit.
add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top