Linux Process Management Concepts: Difference between revisions
Jump to navigation
Jump to search
Line 26: | Line 26: | ||
For Java applications, this setting limits the number of threads a JVM can create, and it can cause the JVM to throw "java.lang.OutOfMemoryError: unable to create new native thread" exceptions when that limit is reached. For more details see {{Internal|Java_Threads#Java_Threads_and_Linux_Processes|Java Threads and Linux Processes}} | For Java applications, this setting limits the number of threads a JVM can create, and it can cause the JVM to throw "java.lang.OutOfMemoryError: unable to create new native thread" exceptions when that limit is reached. For more details see {{Internal|Java_Threads#Java_Threads_and_Linux_Processes|Java Threads and Linux Processes}} | ||
The O/S level symptom of reaching the per-user process limit is: | |||
<pre> | |||
-bash: fork: retry: Resource temporarily unavailable | |||
</pre> | |||
while trying to execute an arbitrary process. |
Revision as of 23:19, 21 April 2017
Internal
Process
Maximum Number of Processes Allowed on the System
cat /proc/sys/kernel/pid_max
or
sysctl kernel.pid_max
For more details, see sysctl.
To get the actual number of processes present in the system, see /proc/stat.
Maximum Number of Processes Available to a Single User
The current value can be read and set with ulimit -u.
For Java applications, this setting limits the number of threads a JVM can create, and it can cause the JVM to throw "java.lang.OutOfMemoryError: unable to create new native thread" exceptions when that limit is reached. For more details see
The O/S level symptom of reaching the per-user process limit is:
-bash: fork: retry: Resource temporarily unavailable
while trying to execute an arbitrary process.