Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    2

    Default SystemExecution in API_Linux.cpp:172: setuid() failed: Resource temporarily unavai...

    I have a client who hosts with NetLogistics in Australia. A couple weeks ago, we started to get random 500 internal errors consistently on the site. Consistently being that we are getting the 500 errors but never the same script/url consistently. Its completely random. Everything worked just fine up until a couple weeks ago. Nothing was changed by any of us unless cPanel automatically did something.

    I've scoured the logs and the only thing recorded for these errors are similar to:

    [Fri Feb 25 15:48:55 2011] [error] [client 58.11.6.200] SystemException in API_Linux.cpp:172: setuid() failed: Resource temporarily unavailable, referer: http://mywebsite.com/myscript.php
    [Fri Feb 25 15:48:55 2011] [error] [client 58.11.6.200] Premature end of script headers: myscript.php, referer: http://mywebsite.com/myscript.php

    I use suPHP with PHP5 on a CentOS 5.2 server. I have checked, rechecked, and triple checked that ownership and permissions are correct (755 for directories, 644 for files; all owned by user and user's group). I don't think this is a permission issue because of the error's randomness.

    I have tried increasing PHP's memory_limit, max_execution_time, etc to no avail. I've tried increasing the number of Apache SpareServers, MaxClients, etc to no avail. I've turned all loglevel's to info but am given nothing.

    As far as I know, I have nothing installed that would limit the number of PHP processes unless cPanel has something native. But from what I have read, cPanel does not unless I install a custom suPHP module to limit processes and I have not done so.

    Any ideas? I'm pretty much at my wits end ;-)

    Thanks,
    Alan

  2. #2
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: SystemExecution in API_Linux.cpp:172: setuid() failed: Resource temporarily unava

    Can you please check if there are actually any RLimit settings in Apache's configuration on the machine?

    Code:
    grep -i rlimit /usr/local/apache/conf/httpd.conf
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  3. #3
    Registered User
    Join Date
    Feb 2011
    Posts
    2

    Default Re: SystemExecution in API_Linux.cpp:172: setuid() failed: Resource temporarily unava

    This is what I'm given:

    Code:
    [15:46:12][root@host:~]# grep -i rlimit /usr/local/apache/conf/httpd.conf
    RLimitCPU 240                                                                                                                                                                         
    RLimitNPROC 10                                                                                                                                                                        
    ServerLimit 250
    Thanks,
    Alan

  4. #4
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: SystemExecution in API_Linux.cpp:172: setuid() failed: Resource temporarily unava

    Then you do have limits on your machine. The RLimitNPROC is the one causing the issue. It is limiting each user to 10 processes, which this account is hitting.

    You will need to comment out the setting entirely and restart Apache to see if that corrects the issue. If it does, then if this was enabled by using WHM > Memory Usage Restrictions area, then you will need to remove the RLimit entries in /var/cpanel/templates/apache2/main.default by copying that file to /var/cpanel/templates/apache2/main.local and then rebuild Apache:

    Code:
    cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bak110305
    /scripts/rebuildhttpdconf
    /etc/init.d/httpd restart
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

Similar Threads & Tags
Similar threads

  1. bash: fork: Resource temporarily unavailable
    By linuxnewbie in forum cPanel and WHM Discussions
    Replies: 25
    Last Post: 09-19-2008, 05:22 PM
  2. procmail and resource temporarily available
    By spiff06 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 11-15-2006, 08:43 AM
  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