Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 26
  1. #1
    Member
    Join Date
    Aug 2002
    Posts
    10

    Default bash: fork: Resource temporarily unavailable

    &bash: fork: Resource temporarily unavailable&

    a client (only this 1 guy) gets this message once he is logged in via ssh and tries to run any command.

    ex: he types &ls& and he gets the above message

    anybody know whats wrong or how to fix this?

    thanks

  2. #2
    Member
    Join Date
    May 2002
    Posts
    119

    Default

    Login to WebHostManager - Shell Fork Bomb Protection - Disable it

  3. #3
    Member
    Join Date
    Dec 2002
    Posts
    64

    Default

    Well I'd like to have that protection on..... why would it display such a message if the client hasn't done anything? I mean an ls isn't going to cause a fork bomb
    ronny@acunett.com
    AcuNett | Setting the Standard in Server Management
    ( Providing Professional Server Management for over 5 years )
    ( http://www.acunett.com )

  4. #4
    cPanel Partner NOC cPanel Partner NOC Badge myusername's Avatar
    Join Date
    Mar 2003
    Location
    chown -R us.us *yourbase*
    Posts
    712
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    I have the same problem for a user, and also would like to maintain that protection.

  5. #5
    Member
    Join Date
    Aug 2001
    Posts
    57

    Question follow up?

    Any further info on this? Just happened to one of our very long running & stable boxes. Got an email that

    /bin/sh: fork: Resource temporarily unavailable

    ....services started failing, and now can't get into ssh or whm to reboot.

  6. #6
    Member Nico's Avatar
    Join Date
    Dec 2001
    Location
    Edmond, OK
    Posts
    233

    Default Re: bash: fork: Resource temporarily unavailable

    Originally posted by linuxnewbie
    &bash: fork: Resource temporarily unavailable&

    a client (only this 1 guy) gets this message once he is logged in via ssh and tries to run any command.

    ex: he types &ls& and he gets the above message

    anybody know whats wrong or how to fix this?

    thanks
    I had this same problem this AM I corrected it like this:
    SSH in as root
    ps -aux |grep username
    (replace username with the user getting this error) You should see all the processes they have running. If you kill those off they can log in afterwards.

  7. #7
    Registered User
    Join Date
    Jan 2004
    Location
    Sibenik, Croatia
    Posts
    3

    Default same here

    i'm having same problems.
    Disable fork bomb protection is not an option and killing processes also!

    Any solutions?

  8. #8
    Member
    Join Date
    Nov 2003
    Posts
    29

    Default

    Hello,

    Is there a way to increase the number of processes that a user is allowed to run?

    Brett

  9. #9
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Edit /etc/profile and make an exception for the user that you want to change the value for.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  10. #10
    Member
    Join Date
    Nov 2003
    Posts
    29

    Default

    Hello Chirpy,

    I looked at the file but because I don't understand it 100% and I dont want to break it I did not change anything. Would you be able to tell me what I should change?

    I tried changing this:
    Code:
    if [ "$LIMITUSER" != "root" ]; then
            ulimit -n 100 -u 20 -m 200000 -d 200000 -s 8192 -c 200000 -v 200000 2>/dev/null
    else
            ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c 1000000 -v unlimited 2>/dev/null
    fi
    To This:
    Code:
    if [ "$LIMITUSER" == "root" ]; then
            ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c 1000000 -v unlimited 2>/dev/null
    else if [ "$LIMITUSER" == "fasthost" ]; then
            ulimit -n 500 -u 100 -m 1000000 -d 1000000 -s 8192 -c 1000000 -v 1000000 2>/dev/null
    else
            ulimit -n 100 -u 20 -m 200000 -d 200000 -s 8192 -c 200000 -v 200000 2>/dev/null
    fi

    But this results in:
    bash: /etc/profile: line 68: syntax error: unexpected end of file



    Best regards,
    Brett
    Last edited by cornernote; 01-30-2005 at 06:59 PM.

  11. #11
    Member
    Join Date
    Nov 2003
    Posts
    29

    Default

    I changed "else if" to "elif" and it worked. Go figure

  12. #12
    Member
    Join Date
    Nov 2003
    Posts
    29

    Default

    Even if I give my account the same settings as root, it still does the same thing. Yet when I log in as root and "sh" to my user, it works fine.

    Brett

  13. #13
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Looks like you may need to make the change in a few other files, though I don't know which take precedence:

    /etc/profile
    /etc/bashrc
    /etc/profile.d/limits.sh

    I cannot say that I've ever tried playing with it, though
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  14. #14
    Member
    Join Date
    Sep 2004
    Posts
    88

    Default

    FWIW.. I found this with a user.. who when we enabled Fork Bomb Protection, when using IMAP with alot of email accounts would not be able to login via shell.

    If you do a "ps -ef | grep <username>" and see a bunch of imapd .. that's one of the reasons.

    Just my 2cents worth.
    Dave Bates
    CEO/President Voyager Design Systems
    http://voygr.com

  15. #15
    Member
    Join Date
    Apr 2003
    Posts
    277

    Default

    I made the changes that were mentioned in this thread - however, I'm still getting the "line 70: syntax error: unexpected end of file" error after changing "else if" to "elif"

    Any ideas?

Similar Threads & Tags
Similar threads

  1. 503 Service Temporarily Unavailable
    By shayanz in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 09-24-2008, 10:03 PM
  2. Service Temporarily Unavailable PAGE
    By aisagtr in forum New User Questions
    Replies: 0
    Last Post: 06-24-2007, 06:49 PM
  3. (11)Resource temporarily unavailable: couldn't spawn child process:
    By KatieBuller in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 06-30-2005, 01:52 AM
  4. 11)Resource temporarily unavailable: couldn't spawn child process
    By astopy in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 01-30-2005, 08:28 AM
  5. Resource temporarily unavailable problem
    By ozzi4648 in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 12-03-2004, 07:18 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube