Errors in log

#1
In the log I get quite a few "connection reset by peer" messages, about half of them are at max requests limit of 5000, but the other half is below this limit - does this indicate any kind of malfunction?

Also, what are the "broken pipe" errors?
 
#3
I'm getting unexplainable errors that are making the site unuseable for the clients. Errors happen exclusively in one module of the PHP script. Upon specific actions in the script a blank page is displayed, and occasionally a 503 error. Log looks like this:

Code:
2008-09-16 14:55:48.657	INFO	[(IP):49230-7#Live Web] connection to [uds://tmp/lshttpd/lsphp.sock] on request #17, error: Connection reset by peer!
2008-09-16 14:55:48.844	INFO	[(IP):49230-7#Live Web] connection to [uds://tmp/lshttpd/lsphp.sock] on request #0, error: Connection reset by peer!
2008-09-16 14:55:49.034	INFO	[(IP):49230-7#Live Web] connection to [uds://tmp/lshttpd/lsphp.sock] on request #0, error: Connection reset by peer!
2008-09-16 14:55:49.034	NOTICE	[(IP):49230-7#Live Web] oops! 503 Service Unavailable
2008-09-16 14:55:49.034	NOTICE	[(IP):49230-7#Live Web] Content len: 0, Request line:
GET /?section=section&action=action HTTP/1.1
I thought this might be a problem with the script, so I've tried a one month old version of the script that didn't have any problems. It still has the problems. I've tried going down one version of litespeed - didn't help. Aside from upgrading to 3.3.18 a couple of days ago nothing else was done to the server or the script. What could be responsible for the errors? I'd appreciate a fast response as the site is partially unuseable for clients.
 
#4
Update

Breaking the php script module that was associated with the problems into smaller separate modules (the module was around 90kb) seems to have fixed the problems for now. I don't understand why it would help since the module was the same large size before and worked perfectly?
 

mistwang

LiteSpeed Staff
#5
I believe PHP crashed during processing this request. Maybe due to missing PHP module, or a PHP bug. changing LSWS is not likely be able to fix this problem unless this request use a lot of memory and the memory limit for PHP process is relatively low.

You may need to find a way to strace the PHP process serving the request, usually it is a lot easier with PHP suEXEC enabled, you can locate the PHP process easily with its UID.
 

mistwang

LiteSpeed Staff
#6
Breaking the php script module that was associated with the problems into smaller separate modules (the module was around 90kb) seems to have fixed the problems for now. I don't understand why it would help since the module was the same large size before and worked perfectly?
Maybe a bug in PHP opcode cache?
 
#7
Today two more modules of the php script stopped working one several hours after the other. This didn't seem to be connected to anything - script module was working perfectly minutes ago and then it gives empty screens or 503 errors, after few hours it doesn't start working again. Server reboot doesn't help. Rewriting the file with changes multiple times so that op code cache re-caches it didn't help. Breaking up the module into smaller separate modules worked again.

The server has been running the same version of PHP and APC perfectly for over a year, they were never upgraded. The only software being upgraded was litespeed. LSAPI was never updated (it is 1.5 - 2 years old) - could that have anything to do with it?

I am worried about this spontaneously decreasing tolerance of the errors, as if PHP has less and less memory to work with. What if the broken up modules stop working too soon, I can't keep breaking them up to infinity. Server has 8GB and 1GB is allocated to PHP, tasks are not memory intensive.
 

mistwang

LiteSpeed Staff
#8
You should try increase the memory limits and process limits for the lsphp external app.
And it is a good idea to keep PHP, APC and LSAPI updated.
 
#9
I've tried increasing memory limits and process limits for phplsapi to ridiculously high numbers (thousands of mb and processes) - didn't change a thing.

Then I finally found the problem - it was the memory_limit setting in php.ini, which was far below the settings in litespeed. I doubled it and no more errors, all modules work fine.

What still puzzles me a little is why the old memory limit worked for a year and a half with no problems, and now suddenly became insufficient for the same php script modules - could that be because the mysql database that the php scripts work with is now bigger?
 
Top