Connection reset by peer & Broken Pipe

semprot

Well-Known Member
#1
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:

NiteWave

Administrator
#2
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!
Does that mean PHP is crashed?
Should i increase the PHP_LSAPI_MAX_REQUESTS ?
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
https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:php:lsapi-environment-variables
 

semprot

Well-Known Member
#3
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
https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:php:lsapi-environment-variables
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:

NiteWave

Administrator
#4
Now i've modified Max Connections to 800, and PHP_LSAPI_MAX_REQUESTS to 800.
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

What is the effect of "reset by peer" anyway? (i always wonder)
Will the client gets any error message on his browser?
Or APC cache released?
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.
 

semprot

Well-Known Member
#5
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
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.


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.
Thank you for the explanation.
 
Top