Re: fastcgi+php=lots of 500 errors ?

"Gabriel Barazer" <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel
Organization REAGI
Message-ID <016801c51fda$c8d85700$4500a8c0@inspiron>
On Wednesday, March 02, 2005 10:40 PM CET,
Jason Pump <JPump-HbNbuK1M3AseIZ0/[email protected]> wrote:

> What OS are you running on?
>

Linux kernel 2.6.10.

> Have you checked that PHP is not running out of memory, or modifying
> php.ini to allow more memory for the process to see how that effects
> the situation?
>

Yes, and it's not a memory problem. I finally solved the problem with 
mod_fcgid.

I think the problem was the timeout in the communication between mod_fastcgi 
and the php process. In the mod_fcgid, i got the IPCCommTimeout variable 
which has the desired effect (not returning a 500 when php take over 3 
seconds to respond). I've note found the same variable in mod_fastcgi.

What about adding this directive in fastcgi ?

In the next weeks, i will certainly attempt to code a fastcgi module 
designed for use with php and minimal configuration (but with the tuning 
stuff), inspired on the fastcgi and mod_fcgid code. I'll let know if this 
project becomes reality :)

So using mod_fcgid (+a suexec patch for my case) seems to work properly with 
php (with the very useful "wrapper" function): zero "500" errors since i've 
passed to this module.

Hope this maybe helps someone,

-- 
Gabriel Barazer <gabriel-G2fI/[email protected]>
REAGI

>> -----Original Message-----
>> From:
>> fastcgi-developers-bounces+jpump=looksmart.net-xGejAJT2w6yOE5Ap4OspEtHuzzzSOjJt@public.gmane.org
>> [mailto:fastcgi-developers-bounces+jpump=looksmart.net-xGejAJT2w6yOE5Ap4OspEv8+0UxHXcjY@public.gmane.org
>> et]On Behalf Of Gabriel Barazer
>> Sent: Monday, February 28, 2005 12:26 PM
>> To: Simon; fastcgi-developers-xGejAJT2w6yOE5Ap4OspEtHuzzzSOjJt@public.gmane.org
>> Subject: Re: [FASTCGI] fastcgi+php=lots of 500 errors ?
>>
>>
>> On Monday, February 28, 2005 9:17 PM CET,
>> Simon <[email protected]> wrote:
>>
>>> Is that the only error you see in your error log? when you see
>>> 200req a sec is that all PHP? is it 200req/sec per server or on all
>>> 3?
>>>
>>
>> excepted the normal info messages from fastcgi such as:
>> [Mon Feb 28 21:20:09 2005] [warn] FastCGI: (dynamic) server
>> "/usr/local/bin/php-fcgi/php.fcgi" (pid 31004) terminated by calling
>> exit with status '0'
>>
>> or
>>
>> [Mon Feb 28 21:20:09 2005] [warn] FastCGI: (dynamic) server
>> "/usr/local/bin/php-fcgi/php.fcgi" (pid 31417) termination signaled
>>
>>
>> or even
>>
>> [Mon Feb 28 21:20:09 2005] [warn] FastCGI: (dynamic) server
>> "/usr/local/bin/php-fcgi/php.fcgi" (uid 522, gid 100) started (pid
>> 31533)
>>
>> which are normal info message about fastcgi activity, yes , this
>> is the only
>> real errors.
>>
>> The servers are 3 pentium 4 3.2Ghz and it is 200req/s on all 3. If
>> they weren't 500's , the configuration was clean : lesser than load
>> average of 1,
>> and a maximum of 400req/s capacity on all 3 servers (benchmark
>> results, and
>> a load not higher than 5).
>>
>> No other debugging information... I think i'll become crazy soon...
>>
>> BTW: i tested with the "stable" fastcgi version (2.4.2), and it
>> produces the
>> same result.
>>
>> --
>> Gabriel Barazer <gabriel-G2fI/[email protected]>
>> REAGI
>>
>>>
>>> On Mon, 28 Feb 2005 19:26:06 +0100, Gabriel Barazer wrote:
>>>
>>>> Hi,
>>>>
>>>> When using php with mod_fastcgi , i get a HUGE number of 500 errors
>>>> and this line in the error log:
>>>> FastCGI: incomplete headers (0 bytes) received from server
>>>> "/usr/local/bin/php-fcgi/php.fcgi"
>>>>
>>>> I have a moderated traffic (~200req per second on 3 servers), and
>>>> these 500's occurs 2-3 times per second on each server.
>>>>
>>>> My actual config is the same on both servers:
>>>> ---
>>>> FastCgiWrapper On
>>>> FastCgiConfig -gainValue 0.8 -killInterval 5 -listen-queue-depth
>>>> 512 -maxClassProcesses 96 -maxProcesses 192 -multiThreshold
>>>> 60 -singleThreshold 1 -startDelay 1 -updateInterval 5
>>>> ScriptAlias /fcgi-bin/ "/usr/local/bin/php-fcgi/"
>>>> <Location /fcgi-bin/>
>>>>        Options ExecCGI
>>>>        SetHandler fastcgi-script
>>>> </Location>
>>>>
>>>> AddHandler php-script .php .inc .pinc .phtml .php3 .php4
>>>> Action php-script /fcgi-bin/php.fcgi
>>>> ---
>>>>
>>>> It appears that if i raise the killinterval AND updateinterval, the
>>>> number of errors decrease after a restart of apache, but as the
>>>> uptime grows, the number of errors grows too...
>>>>
>>>> i haven't succeed to reproduce this bug as it seems to be very
>>>> random (but it happens very more often when the traffic increases)
>>>>
>>>> Anyone have an idea about this *very* annoying effect ?
>>>>
>>>> Oh, i forgot to mention the software versions:
>>>> apache 2.0.53
>>>> php 4.3.10
>>>> mod_fastcgi-snap-0404142202
>>>>
>>>> --
>>>> Gabriel Barazer <gabriel-G2fI/[email protected]>
>>>> REAGI
>>
>> ___________________________________
>> fastcgi-developers mailing list
>> http://fastcgi.com/fastcgi-developers/ 

___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.