No replies, but I thought I should give an update:

I tried decreasing the PHP_FCGI_MAX_REQUESTS to 499 (not even 500, just in
case), as mentioned in the Lighttpd documentation. The error 500 problem
happened again.

I tried switching to Lighttpd, to see if it would work. The error 500
happened again. So I'm back to Cherokee, and looking at the PHP side of
things, because it's clear the problem is not on the web server side.
One more symptom that PHP is having issues: when I shut down Lighttpd, I
need to forcefully kill all the php5-cgi processes. Lighttpd is unable to
stop them, and they actually go into some sort of memory leak/race condition
during the shutdown, and CPU usage spikes to 100%, both processors, and
memory usage starts to increase steadily.

I have removed the php-clamav extension (which was installed since who knows
when, but never used), and now the start and shutdown of Lighttpd works
fine, and the php5-cgi processes terminate normally, no need to kill them.

So I have switched back to Cherokee, without php-clamav now.
PHP_FCGI_MAX_REQUESTS is still at 499. I might increase it again in the
future if the issue has gone away, but I think the performance improvement
is not that noticeable.

Thanks for reading this far :)

On Tue, Nov 17, 2009 at 11:28, Urko Masse <[email protected]> wrote:

> By the way, I have seen this in the documentation for Lighttpd:
>
> Why is my PHP application returning an error 500 from time to time?
>
> This problem seems to stem from a little-known issue with PHP: PHP stops
> accepting new FastCGI connections after handling 500 requests;
> unfortunately, there is a potential race condition during the PHP cleanup
> code in which PHP can be shutting down but still have the socket open, so
> lighty can send request number 501 to PHP and have it "accepted", but then
> PHP appears to simply exit, causing a 500 return from lighty.
>
>
>
> On Tue, Nov 17, 2009 at 08:59, Urko Masse <[email protected]> wrote:
>
>> Hello,
>>
>> I'm having a strange issue. Last night Cherokee 0.99.27 went down, with
>> internal server error 500.
>>
>> When I check the Cherokee error log, I see a lot of lines with this error:
>> LibClamAV Error: cl_load: engine == NULL
>>
>> And also quite a few errors like:
>> [16/11/2009 16:29:31.981] (warning) handler_file.c:173 - Unparseable time
>> 'Sun, 33 Feb 3119 29:69:11 GMT'
>>
>> I was running 0.99.23 before, because it was rock solid for me (and was
>> too busy to touch something that works), and only recently upgraded to
>> 0.99.27. Could it be related?
>>
>> I include my cherokee.conf.
>>
>> Please help!
>>
>> PS: I'm going to look for the 0.99.23 deb file, just in case.
>>
>
>
_______________________________________________
Cherokee mailing list
[email protected]
http://lists.octality.com/listinfo/cherokee

Reply via email to