Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 17th March 2010, 19:25
immobilia immobilia is offline
Junior Member
 
Join Date: Jun 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Question 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>
Reply With Quote
Sponsored Links
  #2  
Old 18th March 2010, 15:13
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
Default

Could be a problem with the memory or server resources in general:
http://gallery.menalto.com/node/82337
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 19th March 2010, 15:32
kisscoolman kisscoolman is offline
Junior Member
 
Join Date: Mar 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Wink 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 ?
Reply With Quote
  #4  
Old 31st March 2010, 15:16
dampi dampi is offline
Junior Member
 
Join Date: Mar 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
  #5  
Old 31st March 2010, 16:42
kisscoolman kisscoolman is offline
Junior Member
 
Join Date: Mar 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
Reply With Quote
  #6  
Old 1st April 2010, 15:31
kisscoolman kisscoolman is offline
Junior Member
 
Join Date: Mar 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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 ?
Reply With Quote
  #7  
Old 21st July 2010, 20:05
Turbanator Turbanator is offline
Senior Member
 
Join Date: Jun 2008
Posts: 216
Thanks: 21
Thanked 16 Times in 16 Posts
Default

Did you ever get this fixed? I have the same problem debian lenny 64.
Reply With Quote
  #8  
Old 26th July 2010, 10:46
4F2E4A2E 4F2E4A2E is offline
Junior Member
 
Join Date: Jul 2010
Posts: 9
Thanks: 2
Thanked 1 Time in 1 Post
Default same same

hi,

i have the same error over here...
please help!
Reply With Quote
  #9  
Old 4th October 2010, 07:06
crypted crypted is offline
Senior Member
 
Join Date: Dec 2006
Location: Oklahoma, USA
Posts: 429
Thanks: 3
Thanked 14 Times in 6 Posts
Default

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
__________________
ISPC3 on Debian! It's great!
Reply With Quote
Reply

Bookmarks

Tags
apache2, fcgi, mod_fcgid, php, php5

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:47.


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