Modify the maximum number of files and processes that Linux users can open (Fork:retry:Resource temporarily unavailable)

Source: Internet
Author: User



today, whenJenkins released the app, it encountered an error, as follows:



/etc/profile:fork:retry:resource temporarily unavailable





Google , most people on the internet say that the reason may be that the number of user processes or the number of open files, reached the limit. According to this idea, I went to check the problem, found that the number of users of the process is More than the number of files opened to more than 1300





and through Ulimit–a , see



Openfiles (-N) 1024



Maxuser processes (-u) 1024





Haha, find it, solve it





Method One:



Modify /etc/security/limits.confdirectlyand add the following ( because the user you want to modify is Hades) :



@hades Soft Nofile 65535



@hades Hard Nofile 65535



@hades Soft Nproc 65535



@hades Hard Nproc 65535



Many people on the web said that the need to restart, then I was frightened, the production server can not restart.



In fact, do not need to restart the server , after a few minutes, the server will reread the file, you just re-login to a shell, you know,OK , hey, do not thank me here, I also after the expert guidance to know, the specific reason I would like to re-see Brother Bird.





Method Two:



in the current user's ./bash_profile , add a row



Ulimit–n 65535 , each time you enter the user's Shell , but I think it's a good method. Low , do you think?



Well, it's over here, and next time, o (∩_∩) o






This article is from the "Hades Blog" blog, please be sure to keep this source http://hades02.blog.51cto.com/9768670/1782184



Modify the maximum number of files and processes that Linux users can open (Fork:retry:Resource temporarily unavailable)


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.