[Solved] Default PHP page: fork() failed, please increase process limit

Discussion in 'Install/Configuration' started by tenants, Feb 25, 2013.

  1. tenants

    tenants New Member

    I've read quite a lot of posts related to this, but none seem to solve my issues

    When I visit my default PHP page (http://localhost:8090/phpinfo.php), I get the following:
    503 Service Unavailable
    The server is temporarily busy, try again later! Powered By LiteSpeed Web Server

    (The "hello world" cgi page is fine)

    This is a new install of litespeed (1st time I have used it)
    The version is: v4.2.2
    I'm using it on a Ubuntu Virtial server (VM ware). I've recently updated + upgraded (sudo apt-get update && sudo apt-get upgrade) to make sure all the packages are the latest

    I've given the VMware 4 processors and 8 gigs

    I've managed to install the PHP (eventually) without errors via the litespeed confMgr
    I did have to do a few things here to begin with, but they were resolved using the info here:
    http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:php:lsapi:troubleshoot

    The error messages suggest increasing the soft/hard process limit, so I've updated these via the confMgr (Configuration >> Server >> Security)
    1) soft (from about 300) now to 1300
    2) hard (from about 600) now to 1600

    I've also tried setting both of these to 0 (the machine default), but I still get the error messages below when visiting the default php page:


    There error in the stderr.log is:
    2013-02-25 05:52:02.837 [STDERR] fork() failed, please increase process limit: Resource temporarily unavailable

    The error in error.log is:

    2013-02-25 05:52:05.041 [NOTICE] [127.0.0.1:50153-0#Example] Max retries has been reached, 503!
    2013-02-25 05:52:05.041 [NOTICE] [127.0.0.1:50153-0#Example] oops! 503 Service Unavailable
    2013-02-25 05:52:05.041 [NOTICE] [127.0.0.1:50153-0#Example] Content len: 0, Request line: 'GET /phpinfo.php HTTP/1.1'
    2013-02-25 05:52:10.183 [INFO] [AdminPHP] add child process pid: 3323, procinfo: 0x87f09f8
    2013-02-25 05:57:08.067 [INFO] [127.0.0.1:50167-0#Example] connection to [/tmp/lshttpd/lsphp5.sock] on request #0, confirmed, 0, associated process: 3321, running: 1, error: Connection reset by peer!
    2013-02-25 05:57:08.067 [INFO] [127.0.0.1:50167-0#Example] connection to [/tmp/lshttpd/lsphp5.sock] on request #0, confirmed, 0, associated process: 3321, running: 1, error: Connection reset by peer!
    2013-02-25 05:57:08.068 [INFO] [127.0.0.1:50167-0#Example] connection to [/tmp/lshttpd/lsphp5.sock] on request #0, confirmed, 0, associated process: 3321, running: 1, error: Connection reset by peer!
    2013-02-25 05:57:08.068 [NOTICE] [127.0.0.1:50167-0#Example] Max retries has been reached, 503!
    2013-02-25 05:57:08.068 [NOTICE] [127.0.0.1:50167-0#Example] oops! 503 Service Unavailable
    2013-02-25 05:57:08.068 [NOTICE] [127.0.0.1:50167-0#Example] Content len: 0, Request line: 'GET /phpinfo.php HTTP/1.1'
    2013-02-25 05:57:08.068 [INFO] [127.0.0.1:50167-0#Example] Cookie len: 107,
  2. NiteWave

    NiteWave Administrator

    how about on command line:
    #cd /usr/local/lsws/fcgi-bin
    #./lsphp5 -i |head
  3. tenants

    tenants New Member

    That returns the following:


    phpinfo()
    PHP Version => 5.4.11

    System => Linux ubuntu 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:32:08 UTC 2012 i686
    Build Date => Feb 25 2013 08:52:37
    Configure Command => './configure' '--prefix=/home/mike/lsws/lsphp5' '--with-mysqli' '--with-zlib' '--with-gd' '--enable-shmop' '--enable-track-vars' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-magic-quotes' '--enable-mbstring' '--with-iconv' '--with-litespeed'
    Server API => LiteSpeed V6.1
    Virtual Directory Support => disabled
    Configuration File (php.ini) Path => /home/mike/lsws/lsphp5/lib
    Loaded Configuration File => (none)


    So.. PHP seems to be installed correctly , but LiteSpeed isnt handeling the PHP mime type correctly (?)
    => It's probably something really stupid (I sped through this thinking I could set up a VPC, Litespeed, PHP .. and then msql/forum withing a few hours, just to test a plugin I was developing)

    I like the LiteSpeed GUI by the way, and the ease of adding additional PHP packages
    Last edited: Feb 25, 2013
  4. tenants

    tenants New Member

    There is something I've noticed about the php5 folders, they seem to have root ownership (why I don't know). I'm going to try changing the permisions of the folders

    Edit: nope

    sudo chown -R mike:mike lsphp5/

    and I still have the same issue
    Last edited: Feb 25, 2013
  5. NiteWave

    NiteWave Administrator

    any message in /usr/local/lsws/logs/stderr.log ?

    have you changed any of the default setting in
    Server->External App->lsphp5 ?

    and you can try build php 5.3.21 with minimum size:
    Configure Parameters:--disable-all

    to see if phpinfo() show up.
  6. tenants

    tenants New Member

    The stderr.log message is in the first post (its the same every time I visit the default PHP page)

    2013-02-25 09:21:34.382 [STDERR] fork() failed, please increase process limit: Resource temporarily unavailable


    I've left the default settings, I just had a look at these and they are set to:
    LSAPI App lsphp4 uds://tmp/lshttpd/lsphp4.sock
    LSAPI App lsphp5 uds://tmp/lshttpd/lsphp5.sock

    I'll try php 5.3.21 with minimum size now
  7. tenants

    tenants New Member

    I still get the error message

    PHP 5.3.21 (using only --disable-all) compiled without error:
    But navigating to the default (or any) PHP file still results in the 503 error
  8. NiteWave

    NiteWave Administrator

    1)try if php 4 work:
    Server->Script Handler->Suffixes: php->Edit->Handler Name:lsphp5->lsphp4,
    then restart lsws

    2)
    #cd /usr/local/lsws/fcgi-bin
    #ldd lsphp5
    to see if any valuable message
  9. webizen

    webizen New Member

    You should change soft/hard process limit in LSPHP5 external app (Admin Console => Configuration => Server => External App => LSPHP5) instead.

    http://www.litespeedtech.com/docs/webserver/config/extapps/#procSoftLimit
  10. tenants

    tenants New Member

Share This Page