[solved] Connection reset by peer and 503 error

Discussion in 'General' started by vB-WP-Admin, Jan 12, 2014.

  1. vB-WP-Admin

    vB-WP-Admin New Member

    After a failed upgrade to PHP 5.4 (it caused out of memory errors), and rolling back to PHP 5.3 (still continued to get out of memory errors, till I raised PHP memory limit to around a 1GB), I am now seeing following errors in Litespeed Webserver log.

    2014-01-12 09:54:45.162 INFO [54.***.***.***:26455-0#APVH_domain.com] connection to [/tmp/lshttpd/lsphp5.sock] on request #10, confirmed, 0, associated process: 15671, running: 1, error: Connection reset by peer!
    2014-01-12 09:54:45.162 NOTICE [54.***.***.***:26455-0#APVH_domain.com] POST request in process stage, fail with 503
    2014-01-12 09:54:45.162 NOTICE [54.***.***.***:26455-0#APVH_domain.com] oops! 503 Service Unavailable
    2014-01-12 09:54:45.162 NOTICE [54.***.***.***:26455-0#APVH_domain.com] Content len: 0, Request line: 'HEAD /forum/photography-f17/threadname-t216 HTTP/1.1'
    2014-01-12 09:54:45.162 INFO [54.***.***.***:26455-0#APVH_domain.com] Cookie len: 326, PHPSESSID=c1d42a944f52badd1d45c748dc188be2; __cfduid=d7f9de5453288cfd6ec15133fa39a4ac01389254029157; v2_lastactivity=0; v2_lastvisit=1389254028; v2_; v2_thread_lastview=16320915cc989b38b9570ca864f5d35d5fdbde04a-3-%7Bi-56699_i-1389338935_i-56698_i-1389338063_i-56709_i-1389409280_%7D
    2014-01-12 09:54:45.162 NOTICE [54.***.***.***:26455-0#APVH_domain.com] Redirect: #1, URL: /forum/vbseo.php
    2014-01-12 09:54:45.162 INFO [54.***.***.***:26455-0#APVH_domain.com] abort request..., code: 4
    2014-01-12 09:54:45.162 INFO [54.***.***.***:26455-0#APVH_domain.com] File not found [/home/domain/public_html/503.shtml]

    These seem to happen every 5-10 minutes or so and while I rarely get blank pages (I think I got it once in past week), I guess users of my forum are getting them regularly.

    Does anyone has any idea why this is happening?

    My host was a little hesitant to troubleshoot it, after failed PHP update and I too am hesitant to let them troubleshoot it, because that failed PHP update cost me around 3 hours of downtime, till I stepped in myself.
    Last edited by a moderator: Jan 13, 2014
  2. NiteWave

    NiteWave Administrator

    does this 503 error happen on a particular domain only(or not)?
    does it have any relation to "HEAD" request ?
  3. vB-WP-Admin

    vB-WP-Admin New Member

    Just noticed it isn't an error with only one domain, it is also occurred on another wordpress blog (separate domain).

    121.189.37.60:40984-0#APVH_domain2.com] connection to [/tmp/lshttpd/lsphp5.sock.044] on request #0, confirmed, 0, associated process: -1, running: 0, error: Connection reset by peer!
  4. NiteWave

    NiteWave Administrator

    have you installed ClouldLinux ?

    2-3 days ago I experienced 503 errors on a user's server, some domains(wordpress) can't work at all while some others works.

    Server->General->Cloud Linux: Not Set
    when I changed it to "Disabled", the 503 errors gone.

    also I removed a few php extensions(.so) in php.ini. can you give a list of .so in
    your current php ?
  5. vB-WP-Admin

    vB-WP-Admin New Member

    Nope, using CentOS.

    Here are the ones which aren't commented out.

    extension="xcache.so"
    extension=pdo.so
    extension=pdo_sqlite.so
    extension=pdo_mysql.so
    extension="memcache.so"

    There are a few others, but they are commented out, so I guess do not count?
  6. NiteWave

    NiteWave Administrator

    I'd suggest to comment out

    extension="xcache.so"
    extension=pdo_sqlite.so
    extension="memcache.so"

    if possible. see if any difference on performance and stability(number of 503 errors in error log)

    if you run php in normal suEXEC mode(suEXEC Worker), no much benefit to enable opcode cache
    however if run php in "suEXEC Daemon" or "suEXEC ProcessGroup" mode(both are litespeed specific mode), opcode cache will work well: decrease the load of CPU.
    for 3 php suEXEC modes, refer
    http://www.litespeedtech.com/products/litespeed-sapi/php/guide-to-suexec-setups
  7. vB-WP-Admin

    vB-WP-Admin New Member

    I am not running php in suEXEC mode, it is running in DSO mode on the server and I guess similar mode in Litespeed.

    I went through a thread here mentioning the same issue and I raised the PHP max connections to 100, and raised the following as well

    PHP_LSAPI_MAX_REQUESTS=1000
    PHP_LSAPI_CHILDREN=100

    And since then, there are no 503 errors in the server log.
  8. NiteWave

    NiteWave Administrator

    great. so your lsphp5 are running as a single user(say nobody)?
    can determine this by
    #ps -ef|grep lsphp5

    in non-suEXEC mode, opcode cache(xcache etc)will work well since the cache is kept in memory as long as the parent lsphp5 is running.
  9. vB-WP-Admin

    vB-WP-Admin New Member

    Yes, it is running as nobody.

Share This Page