Connection reset by peer & Broken Pipe

Discussion in 'General' started by semprot, Nov 29, 2013.

  1. semprot

    semprot Member

    On my error logs i see lot of lines like this

    2013-11-29 07:19:58.096 [INFO] [141.0.9.112:37586-1#APVH_xxx.com] connection to [uds://tmp/lshttpd/lsphp5.sock.10266] on request #200, confirmed, 0, associated process: -1, running: 0, error: Broken pipe!

    2013-11-29 07:20:18.619 [INFO] [141.0.10.17:53063-0#APVH_xxx.com] connection to [uds://tmp/lshttpd/lsphp5.sock.10266] on request #200, confirmed, 0, associated process: -1, running: 0, error: Connection reset by peer!

    Does that mean PHP is crashed?

    Even connecting by winscp & putty sometimes gives me timeout error, is it possible php crash affects SSH too?

    I've also read this other thread which seems related but i'm not sure

    http://www.litespeedtech.com/support/forum/showthread.php?t=3806
    http://www.litespeedtech.com/support/forum/showthread.php?t=5777

    I use :
    lsws 4.1.4
    lsapi 6.6
    PHP 5.3.27

    External Application Abort : No abort
    Max Connections : 200
    Run On Start Up: suexec daemon
    Max Idle Time : -1
    Code:
    PHP_LSAPI_MAX_REQUESTS=200
    PHP_LSAPI_CHILDREN=80
    LSAPI_AVOID_FORK=1
    LSAPI_ALLOW_CORE_DUMP=1
    
    Should i increase the PHP_LSAPI_MAX_REQUESTS ?
    ------------
    And i wonder where the lsapi core dump file is.
    For example if the troublesome php script is "/home/myuser/public_html/demo.php", the core dump will be on "/home/myuser/public_html/" ?
    What is the file name example of core dump file?
    Last edited: Nov 29, 2013
  2. NiteWave

    NiteWave Administrator

    php not crashed. it's related the setting:
    PHP_LSAPI_MAX_REQUESTS=200

    no problem to increase it. how much is good for your server ? I'd ask you the question instead. :)
    Hint: the document is at
    http://www.litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:php_lsapi:environment_variables
  3. semprot

    semprot Member

    Thank you for the hint. :)

    Now i've modified Max Connections to 800, and PHP_LSAPI_MAX_REQUESTS to 800.
    So i just need to increase this number until i get no error & keep my server alive on the other side?

    What is the effect of "reset by peer" anyway? (i always wonder)
    Will the client gets any error message on his browser? (maybe he gets blank page / something)
    Or the client just simply gets longer loading page compared with the other connection which is not "reset by peer"?
    Or APC cache released?
    Last edited: Nov 30, 2013
  4. NiteWave

    NiteWave Administrator

    don't need modify "Max Connections", please revert it back to match "PHP_LSAPI_CHILDREN"

    you can set PHP_LSAPI_MAX_REQUESTS to a very large number, say 15000

    connection between lsws and that lsphp process will be closed, but lsws will open a new one soon to re-try the php request. client won't see any error message. nor any impact to APC cache.
  5. semprot

    semprot Member

    Thank you, so i was wrong from beginning, because i used max connections = 200 & PHP_LSAPI_CHILDREN = 80.

    I have edited max connections to 80, and PHP_LSAPI_MAX_REQUESTS to 2000.


    Thank you for the explanation.

Share This Page