HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   How To Set Up Apache2 With mod_fcgid And PHP5 On Debian Etch (http://www.howtoforge.com/forums/showthread.php?t=44174)

immobilia 17th March 2010 19:25

How To Set Up Apache2 With mod_fcgid And PHP5 On Debian Etch
 
Hy, y follow your great tutorial, but i'have some problems :

Quote:

[warn] (103)Software caused connection abort: mod_fcgid: ap_pass_brigade failed in handle_request function
Quote:

[notice] mod_fcgid: process 3619 going graceful shutdown, sending SIGTERM
[notice] mod_fcgid: process /path/index.php(3619) exit(communication error), terminated by calling exit(), return code: 0
or

Quote:

[notice] mod_fcgid: process /path/index.php(8109) exit(busy timeout), terminated by calling exit(), return code: 0
With browser result :

Quote:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, administrator@mysite.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
I' have sometime this errors, not always... mostly on php pages calling my site himself with php_curl, and others cases...

I use this php-fcgi-starter :

Code:

#!/bin/sh
PHPRC=/etc/php5/cgi/
export PHPRC
export PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_CHILDREN=8
exec /usr/lib/cgi-bin/php

And this Vhost

Code:

<VirtualHost *:80>
  ServerName mysite.com
  ServerAlias www.mysite.com
  ServerAdmin administrator@mysite.com
  DocumentRoot /var/www/mysite/

    ErrorLog /var/log/apache2/mysite-error.log
    CustomLog /var/log/apache2/mysite-access.log common

        <IfModule mod_fcgid.c>
                SuexecUserGroup mysite users
                PHP_Fix_Pathinfo_Enable 1
                <Directory /var/www/mysite/>
                        Options +ExecCGI
                        AllowOverride All
                        AddHandler fcgid-script .php
                        FCGIWrapper /var/www/php-fcgi-scripts/mysite/php-fcgi-starter .php
                        Order allow,deny
                        Allow from all
                </Directory>

# http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
#              IPCCommTimeout 600

IPCConnectTimeout 300
IPCCommTimeout 600

        </IfModule>

  # ErrorLog /var/log/apache2/error.log
  # CustomLog /var/log/apache2/access.log combined
  ServerSignature Off

</VirtualHost>


falko 18th March 2010 15:13

Could be a problem with the memory or server resources in general:
http://gallery.menalto.com/node/82337

kisscoolman 19th March 2010 15:32

Same problem
 
Hi there,

I suffer from the same problem, here comes my configuration :

Code:

ted:~# cat /etc/php5/cgi/php.ini | grep memory_limit
memory_limit = 128M

ted:~# cat /etc/php5/cgi/php.ini | grep max_execution
max_execution_time = 30

ted:~# cat /etc/php5/cgi/php.ini | grep timeout
default_socket_timeout = 60
mysql.connect_timeout = 60

Code:

ted:~# cat /etc/apache2/fcgi.conf
<IfModule mod_fcgid.c>
        AddHandler      fcgid-script .php

        IdleTimeout            600
        ProcessLifeTime        7200
        MaxProcessCount        1000
        DefaultMinClassProcessCount 3
        DefaultMaxClassProcessCount 100
        IPCConnectTimeout      8
        IPCCommTimeout          60
</IfModule>

(this file is included in every virtualhost)

The wrapper :
Code:

ted:~# cat /home/sites/XXXXX/php5-fastcgi-wrapper
#!/bin/sh

export PHP_FCGI_CHILDREN=0
export PHP_FCGI_MAX_REQUESTS=10000
exec /usr/bin/php5-cgi

A virtualhost exemple :
Code:

ted:~# cat /etc/apache2/sites-available/XXXXXX.YYY/www.XXXXXX.YYY
<VirtualHost *:80>
        ServerAdmin postmaster@XXXXXX.YYY
        ServerName XXXXXX.YYY
        RedirectPermanent / http://www.XXXXXX.YYY/
</VirtualHost>

<VirtualHost *:80>
        ServerAdmin postmaster@XXXXXX.YYY
        ServerName www.XXXXXX.YYY
        DocumentRoot /home/sites/XXXXXX/YYY/www/

        Include /etc/apache2/fcgi.conf

        <IfModule mod_fcgid.c>
                SuexecUserGroup XXXXX XXXXX

                <Directory /home/sites/XXXXX/YY/www/>
                        Options -Indexes +ExecCGI
                        AddHandler fcgid-script .php
                        FCGIWrapper /home/sites/XXXXX/php5-fastcgi-wrapper .php
                        AllowOverride FileInfo AuthConfig
                </Directory>
        </IfModule>

        AddOutputFilterByType DEFLATE text/html text/css application/x-javascript application/x-shockware-flash

        ErrorLog /var/log/apache2/XXXXX/error.log
        CustomLog /var/log/apache2/XXXXX/access.log combined
</VirtualHost>

The errors are the same as immobilia.

Any idea ?

dampi 31st March 2010 15:16

Hi!

You have a BusyTimeout error. The default time for a Busy Timeout is 600 seconds.
Try adding
Code:

BusyTimeout 1200
into your section of <IfModule mod_fcgid.c>

More info about fcgid Busy Timeout: http://httpd.apache.org/mod_fcgid/mo...gidbusytimeout
(the format above is new for the next Apache 2.3, in case you are using 2.2 you need to use Busy Timeout as described above)

Hope this helps,
Damian

kisscoolman 31st March 2010 16:42

Hi dampi,

I'm trying your solution, however, I don't think it'll fix the problem in so far as when the bug comes, you don't have to wait 300 or 600 seconds ...
The page loads during 5 to 10 seconds, then the error comes.

I keep my fingers crossed, and i'll let you know if it fix, or not, this problem.

Thank you.

kisscoolman 1st April 2010 15:31

As I tought, it didn't fix the problem :

Code:

ted:~# cat /etc/apache2/fcgi.conf
<IfModule mod_fcgid.c>
        AddHandler      fcgid-script .php

        BusyTimeout            1200
        IdleTimeout            600
        ProcessLifeTime        7200
        MaxProcessCount        1000
        DefaultMinClassProcessCount 3
        DefaultMaxClassProcessCount 100
        IPCConnectTimeout      8
        IPCCommTimeout          60

</IfModule>

I made the modification yesterday, and today, I have these errors :

Code:

[Thu Apr 01 15:03:01 2010] [warn] (103)Software caused connection abort: mod_fcgid: ap_pass_brigade failed in handle_request function
[Thu Apr 01 15:03:09 2010] [warn] (103)Software caused connection abort: mod_fcgid: ap_pass_brigade failed in handle_request function
[Thu Apr 01 15:08:05 2010] [warn] (103)Software caused connection abort: mod_fcgid: ap_pass_brigade failed in handle_request function
[Thu Apr 01 15:08:14 2010] [warn] (103)Software caused connection abort: mod_fcgid: ap_pass_brigade failed in handle_request function
[Thu Apr 01 15:13:09 2010] [warn] (103)Software caused connection abort: mod_fcgid: ap_pass_brigade failed in handle_request function
[Thu Apr 01 15:13:16 2010] [warn] (103)Software caused connection abort: mod_fcgid: ap_pass_brigade failed in handle_request function
[Thu Apr 01 15:17:18 2010] [warn] (103)Software caused connection abort: mod_fcgid: ap_pass_brigade failed in handle_request function
[Thu Apr 01 15:18:10 2010] [warn] (103)Software caused connection abort: mod_fcgid: ap_pass_brigade failed in handle_request function
[Thu Apr 01 15:18:18 2010] [warn] (103)Software caused connection abort: mod_fcgid: ap_pass_brigade failed in handle_request function
[Thu Apr 01 15:23:08 2010] [warn] (103)Software caused connection abort: mod_fcgid: ap_pass_brigade failed in handle_request function
[Thu Apr 01 15:23:14 2010] [warn] (103)Software caused connection abort: mod_fcgid: ap_pass_brigade failed in handle_request function
[Thu Apr 01 15:28:04 2010] [warn] (103)Software caused connection abort: mod_fcgid: ap_pass_brigade failed in handle_request function
[Thu Apr 01 15:28:15 2010] [warn] (103)Software caused connection abort: mod_fcgid: ap_pass_brigade failed in handle_request function

Any other idea ?

Turbanator 21st July 2010 20:05

Did you ever get this fixed? I have the same problem debian lenny 64.

4F2E4A2E 26th July 2010 10:46

same same
 
hi,

i have the same error over here...
please help!

crypted 4th October 2010 07:06

I am having the same problem with my ISPC3 install on Debian Lenny.

I've noticed my CPU LOAD for WEB8 is constantly at 80-100%. It ends up locking up my machine after a couple of days.

Anyway, I'm getting that same error in the error.log for the website.

(103)Software caused connection abort: mod_fcgid: ap_pass_brigade failed in handle_request

falko 5th October 2010 16:45

I've found two possible solutions here:
http://serverfault.com/questions/617...doesnt-respawn
http://www.moe.co.uk/2010/04/12/mod_...cript-headers/


All times are GMT +2. The time now is 05:44.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.