Errors in log

Discussion in 'Install/Configuration' started by valera, Sep 16, 2008.

  1. valera

    valera New Member

    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?
  2. mistwang

    mistwang LiteSpeed Staff

    Those are normal. "borken pipe" is the result of error code EPIPE, just another way to say that peer has closed the connection.
  3. valera

    valera New Member

    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. valera

    valera New Member

    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?
  5. mistwang

    mistwang LiteSpeed Staff

    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.
  6. mistwang

    mistwang LiteSpeed Staff

    Maybe a bug in PHP opcode cache?
  7. valera

    valera New Member

    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.
  8. mistwang

    mistwang LiteSpeed Staff

    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. valera

    valera New Member

    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?
  10. mistwang

    mistwang LiteSpeed Staff

    I guess so.

Share This Page