LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-15-2015, 05:50 AM   #1
urello
LQ Newbie
 
Registered: Jul 2014
Posts: 13

Rep: Reputation: Disabled
-bash: fork: retry: Resource temporarily unavailable


Hi.Occasionally my server cannot spawn any new process saying: "-bash: fork: retry: Resource temporarily unavailable"
I increased nproc and nofiles values in /etc/security/limits.conf to 65000, but problem remains.
While problems occurs:
Code:
root@lab7# sysctl fs.file-nr
fs.file-nr = 22336      0       9782150
Code:
root@lab7# ps -efL |wc -l 
9156
Code:
root@lab7# cat /etc/security/limits.conf
*               soft    nofile          65000
*               hard    nofile          65000
mongod          soft    nproc           65000
mongod          hard    nproc           65000
As i can see, values are far below the limit. So what could be the root cause of the problem? All 3rd party services are running under "mongod" user and the problem is limited to this user only. If get root shell before the problem occurs, i can work in it without problems.
OS: RHEL 6.6
 
Old 12-15-2015, 05:55 AM   #2
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: A few
Posts: 4,620

Rep: Reputation: 1345Reputation: 1345Reputation: 1345Reputation: 1345Reputation: 1345Reputation: 1345Reputation: 1345Reputation: 1345Reputation: 1345Reputation: 1345
Anything in the kernel buffer or /var/log/messages?
 
Old 12-15-2015, 06:06 AM   #3
urello
LQ Newbie
 
Registered: Jul 2014
Posts: 13

Original Poster
Rep: Reputation: Disabled
Nothing useful in messages.
How can one query kernel buffer?
 
Old 12-15-2015, 06:24 AM   #4
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: A few
Posts: 4,620

Rep: Reputation: 1345Reputation: 1345Reputation: 1345Reputation: 1345Reputation: 1345Reputation: 1345Reputation: 1345Reputation: 1345Reputation: 1345Reputation: 1345
The dmesg command. Since it has a rather long output, you usually run it as dmesg | tail.
Usually, kernel messages are also written to the /var/log/messages file, so I doubt you will find much there. But it's worthwhile trying it.

Other ideas off the cuff:
  • The pam_limits module is not used or disabled.
  • The limits.conf file is overwritten by files in /etc/security/limits.d.
  • Do you have enough virtual memory?
  • Does another ulimit apply?
  • You can run ulimit -a to check the real limits of your shell.

Last edited by berndbausch; 12-15-2015 at 06:27 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] "bash: fork: Resource temporarily unavailable" now occurring, did not before RandomTroll Linux - Software 3 04-18-2013 07:56 PM
Default bash: fork: Resource temporarily unavailable :SSH LittleMaster Linux - Server 3 03-13-2013 09:32 PM
fork: resource temporarily unavailable ??? str8edge Linux - General 3 06-21-2011 09:00 AM
"fork: Resource temporarily unavailable" for certain user yoachan Linux - Server 6 01-06-2010 08:46 PM
./configure: fork: Resource temporarily unavailable doodlebug Linux - Server 3 08-23-2007 03:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration