[solved] Max retries has been reached, 503!

Discussion in 'Bug Reports' started by track1, Feb 2, 2011.

  1. track1

    track1 Member

    im testing litespeed for a large vb board, and is failing from time to time with 503 error pages. Error log shows this:

    Server: WHM/Cpanel - RH 5.2 32 bits, 4GB Ram, Dual Harpertown 5430.
    Litespeed: Enterprise 4.0.19
    PHP: 5.2.16, compiled for litespeed using Build Matching PHP Binary in WHM | no special modules
    Others: XCache 1.3.1, tested active or inactive, same 503 errors.
    Server load: (average) - Load 1.50, 1.68, 1.78

    Site run under Apache 2.0 without any error.
    What can i check to detect errors source, or modify to avoid these errors?
    Last edited by a moderator: Feb 11, 2011
  2. NiteWave

    NiteWave Administrator

    many reason can cause 503. need check many settings. first, please check in admin console:
    Server->External App->lsphp5
    Memory Soft Limit (bytes)
    Memory Hard Limit (bytes)

    php in suExec or non-suExec mode?
  3. track1

    track1 Member

    PHP non-suExec

    Max Connections 50


    Memory Soft Limit (bytes) 900M
    Memory Hard Limit (bytes) 1000M

    Process Soft Limit 1000
    Process Hard Limit 1000
  4. webizen

    webizen New Member

    is there anything in /usr/local/apache/logs/stderr.log when 503 happens?
  5. track1

    track1 Member

    no, stderr.log file is empty
  6. webizen

    webizen New Member

    For the 503 errors (correlate with timestamp and URL requested), please find out the browser info (User Agent) in access_log. This is to see whether the errors were triggered by certain browser, with cookie or not, registered user only, etc. If cookie is clear, will the error go away? Is database (mysql) on the same machine or separate one?

  7. track1

    track1 Member

    Is running www only, mysql is running in other box.

    Currently testing Litespeed at 3 web servers with same specs and running same site, with different options (default config, tunned, cache on/off...)

    All get same 503 errors at times and lot of "Content len: 0, Request line: 'GET ...".

    After some tests this is what i have:

    - Error shows at multiple user-agents (firefox, chrome, etc).
    - Logged-in, users with cookie.
    - Large cookies (~4k).
    Last edited: Feb 3, 2011
  8. track1

    track1 Member

    DEBUG LOG: 503 error for user ip attached

    Attached Files:

    Last edited: Feb 3, 2011
  9. track1

    track1 Member

    Tested LiteSpeed/4.1RC4 in one server, and same 503 problems.
  10. track1

    track1 Member

  11. track1

    track1 Member

    after more tests, and reproducing own 503 errors with a large cookie,
    found that reducing cookie size had no error.
  12. webizen

    webizen New Member

    Good to hear.

    The error below (from your debug log) indicates php crashed. lsapi tried to recover connection and failed (Max retries has been reached). Usually, should let PHP dump core file and find out what the root cause is.

  13. track1

    track1 Member

    problems seems to be cookie size > 4kb
    but why Apache/PHP don't crash?
  14. mistwang

    mistwang LiteSpeed Staff

    If Apache/PHP crash, user only got a blank page.different symptom.
    Likely a PHP internal issue as LSAPI does not deal with cookies at all.
  15. track1

    track1 Member

    yes, but apache simply does not crash (do not show a blank page with cookies over 4kb), while litespeed shows 503 error.
    Last edited: Feb 4, 2011
  16. mistwang

    mistwang LiteSpeed Staff

    It is a mystery now why PHP crash with large cookie size. If you could create a simple test script to trigger it, we would like to investigate it in our lab.
  17. xnetua

    xnetua New Member

    Why the thread is marked as solved?
    I have the same problem:

    2011-02-10 11:58:39.584 [NOTICE] [] Redirect: #1, URL: /index.php
    2011-02-10 11:59:32.539 [NOTICE] [] Max retries has been reached, 503!
    2011-02-10 11:59:32.539 [NOTICE] [] oops! 503 Service Unavailable
    2011-02-10 11:59:32.539 [NOTICE] [] Content len: 0, Request line: 'GET / HTTP/1.1'

    2011-02-10 11:26:48.571 [NOTICE] [] Max retries has been reached, 503!
    2011-02-10 11:26:48.571 [NOTICE] [] oops! 503 Service Unavailable
    2011-02-10 11:26:48.571 [NOTICE] [] Content len: 263, Request line: 'POST /wp-admin/admin-ajax.php HTTP/1.1'

    2011-02-10 11:59:32.539 [INFO] [uds://usr/local/lsws/tmp/p16932_lsphp.sock] Connection refused, restart!
    2011-02-10 11:59:32.539 [INFO] [uds://usr/local/lsws/tmp/p16932_lsphp.sock] Connection refused, restart!
    2011-02-10 11:59:32.539 [INFO] [uds://usr/local/lsws/tmp/p16932_lsphp.sock] Connection refused, restart!
    2011-02-10 11:59:32.539 [NOTICE] [] Max retries has been reached, 503!
    2011-02-10 11:59:32.539 [NOTICE] [] oops! 503 Service Unavailable
  18. webizen

    webizen New Member

    Is 503 error consistent or sporadic? If consistent, it is more of a php problem. Turn off opcode cache if any to troubleshoot. Also check stderr.log and see if there is anything when the 503 error happened.
  19. NiteWave

    NiteWave Administrator

    need add a note here for future search:
    they changed the php code to reduce the cookie size, and fixed 503 error.

    503 is a general error, there are many reasons to cause 503.for example, if a php script fail to get enough memory, a 503 error may occur.

    please create a new thread for better trace your issue. Will mark this thread back to "solved"
    Last edited: Feb 11, 2011

Share This Page