Centos 6 User Login prompts-bash:fork:resource temporarily unavailable

Source: Internet
Author: User
Tags centos

Operating system CentOS 6.3 Normal, one day log in to the normal user prompts as follows:
-bash:fork:resource temporarily unavailable

Checked online, because the Linux system's file restrictions cause the root user login does not have such a hint.
Then modify the system restriction configuration,/etc/security/limits.conf: as follows

The code is as follows Copy Code

* Soft Nproc 10000
* Hard Nproc 10000
* Soft Nofile 1048576
* Hard Nofile 1048576

Verify, but the result is still set invalid

The code is as follows Copy Code
# su-m-C ' ulimit-u ' username

It is determined that the CentOS 6.x version adds a limited configuration/etc/security/limits.d/90-nproc.conf to ensure that the root user is unrestricted. This configuration overrides the setting of the primary configuration file:

The code is as follows Copy Code

# Default limit for number of user ' s processes to prevent
# Accidental fork bombs.
# RHBZ #432903 for reasoning.

* Soft Nproc 1024
Root Soft Nproc Unlimited


Solution :


Back up/etc/security/limits.d/90-nproc.conf and then modify the/etc/security/limits.d/90-nproc.conf file in the 1024 line to change 1024 to 10240, the other large number.

  code is as follows copy code
# su-m-C" Ulimit-u ' username
10240
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.