Hello Daniel,

At first, thanks for your answer and the hints.

The configuration I pasted in my prev mail was false positive, fcgid got
broken after several hours of use.
My next try was to disable (not loadint at all) eAccalerator, but
nothing has changed.

Basicly I get 4 classes of  errors, there is a timeout one:
[Sat Oct 20 09:19:25 2007] [warn] mod_fcgid: read data timeout in 80 seconds

There is a connection reset by peer (?!):
[Mon Oct 22 05:41:49 2007] [warn] (104)Connection reset by peer: mod_fcgid: 
read data from fastcgi server error.

There is something i dont know anything about it:
[Mon Oct 22 09:00:54 2007] [warn] (32)Broken pipe: mod_fcgid: ap_pass_brigade 
failed in handle_request function

And there is a communication error:
[Mon Oct 22 05:43:59 2007] [notice] mod_fcgid: process 
/wwwroot/pages/index.php(2358) exit(communication err
or), terminated by calling exit(), return code: 0
I think this one is not a real error and it occours when the client
terminates the tcp connection before the request is processed.


I have another box its kinda old hw and load is relative high, like
~160 requests / sec, running:
Server version: Apache/2.2.6 (Unix)
PHP 4.4.7 (cgi-fcgi) (built: May  7 2007 00:56:13)
And mod_fcgid latest, with a very basic confuguration like this:
LoadModule fcgid_module modules/mod_fcgid.so
AddHandler fcgid-script .php
FCGIWrapper "/usr/local/bin/php -c /usr/local/apache/conf/php.ini" .php

On this box I got the same error messages pasted above at very high
rate, like 1-2 in every minute, which made the service quite unstable.

Now i moved to mod_fastcgi again, (though i hate its complicated way
of binding to php files) using PHP as external FCGI server. Even
eAccelerator is loaded...
So far so good (after ~8 hours of use)

Has anybody else ever experienced these weird errors?

Erno


> Hello Erno,

> As to your first part I might have some additional information to clarify
> the messages you have seen in your logs.

>> I am having troubles with the following combination:
>> Apache 2.2.6 + mod_fcgid 2.2 + php-fcgi 5.2.4 + eAccelerator(latest)
> eAccelerator is really bad for php 5.2+. It generates false opcodes as
> far as I can tell (for example protected variables in php are not
> accessible from within the class itself, etc). You should consider
> switching to APC or Xcache.

>> I got Internal server error time to time, some examples taken from
>> error_log:
>>
>> [Sat Oct 20 08:26:12 2007] [warn] (104)Connection reset by peer:
>> mod_fcgid: read data from fastcgi server error. [Sat Oct 20 08:26:12
>> 2007] [error] [client xxx] Premature end of
>> script headers: foobar1.php, referer: http://foobar/foobar1.php
> A few weeks ago I traced this bug down to the initialization code of the
> PHP fastcgi interpreter. In fact this bug itself is caused by eAccelerator
> trying to get a shared memory segment but fails to do so.

> PHP (till 5.1) wanted to print an error message, but accessed 
> non-initialized
> structures and crashed with signal 11. Since 5.2 there is a refactored
> method for printing the error message that does not crash. Apache is
> expecting "Content-type: .." as reply but gets the error instead, hence the
> "Premature end of script headers..." error message.

>> I was really out of ideas and then it just came up, that i read in
>> lighttpd's documentation, that if you were using opcode cacher you
>> have to limit number of fcgi processes to 1 and increase php's
>> internal process manager to a higher value by setting
>> PHP_FCGI_CHILDREN environment variable. So i set PHP_FCGI_CHILDREN to
>> 10 in the shell script and MaxProcessCount to 1 in httpd.conf.
>>
>> Configuration seems to be stable and no internal server errors
>> anymore (so far anyway).
> How does the server handle under heavy load? Since the original problem
> is caused by heavy load, have you stress-tested the Apache with "ab"?

>> And now my question is:
>>
>> mod_fcgid reports the following events, which is normal:
>> [Sat Oct 20 14:49:10 2007] [notice] mod_fcgid:
>> /web/web/host/foobar.hu/pages/foobar4.php total process count 1 >= 1,
>> skip the spawn request
>>
>> I am not familiar with the fastcgi protocol at all, so I am wondering
>> whether in this case mod_fcgid forwards the requests to the php
>> process manager or is waiting for processing of prev requests to be
>> finished?...

> I was wondering, in the configuration above you mentioned:

> (httpd)
> MaxRequestsPerProcess 500

> (php wrapper script)
> PHP_FCGI_MAX_REQUESTS=2000
> export PHP_FCGI_MAX_REQUESTS

> are these lines still accurate in your current configuration? If so,
> you should change these values to be the same.

> Regards,
> Daniel



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Mod-fcgid-users mailing list
Mod-fcgid-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users

Reply via email to