Solve ssh logon error-bash fork retry Resource temporarily unavailable

Source: Internet
Author: User

Solve ssh logon error-bash fork retry Resource temporarily unavailable

An error is reported when a non-root user logs on to SSH. bash fork retry Resource temporarily unavailable.

This problem may be caused by/etc/security/limits. the nproc in the d/90-nproc.conf file has reached the upper limit, or the above configuration file has been released only for specific users, while other users still have restrictions.

The 90-nproc.conf here may be a machine.

The solution is to modify the nproc ceiling or the corresponding user account, and then restart the system to take effect.

Note: This file is only available after CentOS 6 and is not available in CentOS 5.10.

Perform the following steps:

1. cp-a/etc/security/limits. d/90-nproc.conf/etc/security/limits. d/90-nproc.conf.bak

Note: This operation is a backup file, which can be used for restoration to avoid Operation errors.

2. vim/etc/security/limits. d/90-nproc.conf

# Default limit for number of user's processes to prevent

# Accidental fork bombs.

# See rhbz #432903 for reasoning.

* Soft nproc 1024

Here, change 1024 to a greater value and set it as needed. For example, set it to 1500.

# Default limit for number of user's processes to prevent

# Accidental fork bombs.

# See rhbz #432903 for reasoning.

* Soft nproc 1500

If there is a limit on a specific user, modify the corresponding row content. For example:

# Default limit for number of user's processes to prevent

# Accidental fork bombs.

# See rhbz #432903 for reasoning.

Mayun soft nproc 1024

* Soft nproc 1500

To:

# Default limit for number of user's processes to prevent

# Accidental fork bombs.

# See rhbz #432903 for reasoning.

Mayun soft nproc 2000

* Soft nproc 1500

3. init 6

Note: restart the system

In addition, if this does not work, you can kill some processes of this user. If so, a process of this user has a loop and has been occupying some resources.

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.