503 errors until restart on some virtual hosts only

Discussion in 'General' started by dataiv, Oct 4, 2012.

  1. dataiv

    dataiv New Member

    Hi,
    I am running LSWS 4.2 Standard and am having problems only sometimes with 503 errors on some virtual hosts only. I get no 503 errors for a long time (the last stretch was 2 weeks), then all of a sudden I get 503 errors constantly for that site with no requests working at all. The logs don't show anything but messages like this for the virtual hosts that are affected. It looks fine with processes starting and stopping until all of a sudden it starts failing to connect and giving 503s:

    Code:
    2012-09-20 01:57:14.408 [INFO] Remove pid: 27939, exitcode: 0
    2012-09-20 01:57:15.638 [INFO] Remove pid: 27937, exitcode: 0
    2012-09-20 01:57:25.836 [INFO] [157.55.32.111:31752-0#site136] connection to [/tmp/lshttpd/lsphp5-site136.sock] on request #0, confirmed, 0, associated process: 25224, running: 0, error: No such file or directory!
    2012-09-20 01:57:25.836 [INFO] [uds://tmp/lshttpd/lsphp5-site136.sock] Connection refused, restart!
    2012-09-20 01:57:25.836 [INFO] [157.55.32.111:31752-0#site136] connection to [/tmp/lshttpd/lsphp5-site136.sock] on request #0, confirmed, 0, associated process: 25224, running: 0, error: No such file or directory!
    2012-09-20 01:57:25.836 [INFO] [uds://tmp/lshttpd/lsphp5-site136.sock] Connection refused, restart!
    2012-09-20 01:57:25.836 [INFO] [157.55.32.111:31752-0#site136] connection to [/tmp/lshttpd/lsphp5-site136.sock] on request #0, confirmed, 0, associated process: 25224, running: 0, error: No such file or directory!
    2012-09-20 01:57:25.836 [INFO] [uds://tmp/lshttpd/lsphp5-site136.sock] Connection refused, restart!
    2012-09-20 01:57:25.836 [NOTICE] [157.55.32.111:31752-0#site136] Max retries has been reached, 503!
    2012-09-20 01:57:25.836 [NOTICE] [157.55.32.111:31752-0#site136] oops! 503 Service Unavailable^M
    2012-09-20 01:57:25.836 [NOTICE] [157.55.32.111:31752-0#site136] Content len: 0, Request line: 'GET /artist/70/29/1 HTTP/1.1'
    2012-09-20 01:57:25.836 [NOTICE] [157.55.32.111:31752-0#site136] Redirect: #1, URL: /index.php
    It doesn't stop doing this until I restart lsws, then the problem is magically fixed for some time again. Every PHP request gets a 503. Yet at the same time, other virtual hosts that aren't affected don't have the problem. Each virtual host has its own PHP handler to allow the PHP processes to all to run as the individual user.

    I am surprised that it doesn't self-recover and stop giving 503s after a while, but even 12 hours later it still gives 503s on one virtual host and others are working just fine. Why isn't it retrying, and why does it have to wait until I restart lsws before it starts working again? Is there a way to force that to happen if it gets into this state automatically?

    I am completely out of ideas and have tried tuning things lots. Any help / ideas would be appreciated.

    For each vhost I have "ExtApp Set UID Mode" set to DocRoot UID and the PHP configuration is like it is in the attached image.

    Thanks!

    Attached Files:

  2. webizen

    webizen New Member

    any reason why your process limit and memory limit all set at 0?
  3. dataiv

    dataiv New Member

    Because the help says for memory limit, don't overtune - and I've got a low enough memory setting in the php.ini. For the process limit, no matter what I set it to it complains that it is set too low in the log files, so I set it to 0, but given that LSAPI_MAX_CHILDREN is set to 3, it never starts more than 3. I've verified this with benchmarking tools hammering the site, so I don't think this is related, but I'm not sure.

    The problem with the perpetual 503 errors is that I can't figure out when it happens and it's not reproducible. It just happens randomly and then until lsws restart, but at the same time there is no heavy memory usage, and all other sites are still working just fine on the same server, even with PHP.

Share This Page