Solve the OOM: unable to create new native thread problem on Red Hat Linux 6.1 and run a large and complex Java System on the default Red Hat Linux 6.1, if the Java system starts multiple Java processes and each process has many threads, you may encounter java during running. lang. outOfMemoryError: unable to create new native thread www.2cto.com when you encounter this problem, we generally want to adjust the JVM memory settings, but in fact this is probably because the Linux ulimit settings are too small, it is useless to adjust the JVM memory settings. Linux limits the maximum number of Processes that each User can enable (Max User Processes). If this value is relatively small, when the program runs, a fatal error occurs. Run the ulimit-a command to view the current ulimit settings. Red Hat Linux 5. x The default Max User Processes is 16384, while the default Max User Processes of Red Hat Linux 6.1 has been changed to 1024. for large and complex Java systems, 1024 is actually a little smaller than www.2cto.com. We can set Max User Processes according to the system situation. If it is only temporarily used by the current user, run the command: ulimit-u new-max-user-processes-value, use the root user to modify/etc/security/limits. d/90-nproc.conf file: * soft nproc new-max-user-processes-value and then restart the system to make it take effect