#1  
Old 22nd November 2010, 20:31
itsnedkeren itsnedkeren is offline
Senior Member
 
Join Date: May 2009
Location: Denmark
Posts: 128
Thanks: 32
Thanked 10 Times in 10 Posts
Default ISPC 3.0.3 - Fast-CGI questions

Hi all,

Where can I define the settings for Fast-CGI with ISPConfig (MaxServers, etc)?

Yesterday I tried following a guide I found on google, as how to enable Fast-CGI with mpm-worker module for additional speed on Apache2, and that guide ended up with ruining my entire Apache config

I had "Internal Server Error 500" on many pages and I had to restore from a backup as I simply couldn't remove the errors.

Here's what I did(maybe someone can explain why it went bad):

Code:
#aptitude install apache2-mpm-worker libapache2-mod-fcgid
#aptitude install php5-cgi php5-curl php5-gd php5-mysql
added a php-fastcgi.conf file to /etc/apache2/conf.d/
this file contained multiple settings/options set, like MaxServers, MaxProcesses and so on.

After Apache restart, my webmail went down with error500 and my other sites was not working properly.

If someone has time to explain me why this could have happened it would be much appreciated.

Thanks
__________________
Best regards

Jim
Reply With Quote
Sponsored Links
  #2  
Old 23rd November 2010, 12:19
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,555
Thanks: 791
Thanked 4,977 Times in 3,899 Posts
Default

Quote:
I had "Internal Server Error 500" on many pages and I had to restore from a backup as I simply couldn't remove the errors.
Please post the exact error messages from the error log of the website that caused that error.

Quote:
added a php-fastcgi.conf file to /etc/apache2/conf.d/
this file contained multiple settings/options set, like MaxServers, MaxProcesses and so on.
Such parameters are set in the vhost, so that global file will not be used. The settings that ispconfig uses are already optimized, so there is normally no need for any changes. If you still want to change settings, then do the changes in the vhost master template.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
itsnedkeren (23rd November 2010)
  #3  
Old 23rd November 2010, 12:38
itsnedkeren itsnedkeren is offline
Senior Member
 
Join Date: May 2009
Location: Denmark
Posts: 128
Thanks: 32
Thanked 10 Times in 10 Posts
Default

Unfortunatly i forgot to transfer the logs before I restored

Thanks for the info, I'm staying with your optimized files for now.

By the way, is it normal with Fast-CGI that it eats up all the RAM? Sites are running fine, but RAM in TOP is 50MB free.

This is the Apache2 conf:

#21/11-2010
<IfModule mpm_prefork_module>
StartServers 50
MinSpareServers 15
MaxSpareServers 30
MaxClients 225
MaxRequestsPerChild 4000
</IfModule>

Thanks again
__________________
Best regards

Jim

Last edited by itsnedkeren; 23rd November 2010 at 12:40.
Reply With Quote
  #4  
Old 23rd November 2010, 14:18
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,555
Thanks: 791
Thanked 4,977 Times in 3,899 Posts
Default

Quote:
Originally Posted by itsnedkeren View Post
By the way, is it normal with Fast-CGI that it eats up all the RAM? Sites are running fine, but RAM in TOP is 50MB free.
Check under system > server config > fastcgi that "FastCGI Children" is set to 1. If it is set to a larger number, change it to 1, then go to the settings of the website and change a value (e.g. change quota) and click on save so that the config file gets rewritten.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
itsnedkeren (23rd November 2010)
  #5  
Old 23rd November 2010, 14:33
itsnedkeren itsnedkeren is offline
Senior Member
 
Join Date: May 2009
Location: Denmark
Posts: 128
Thanks: 32
Thanked 10 Times in 10 Posts
Default

Thanks Till,

It was set to 8, so I have changed it now. Any way to verify that setting?

And what is the difference from 8 to 1?

Thanks again
__________________
Best regards

Jim
Reply With Quote
  #6  
Old 23rd November 2010, 14:37
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,555
Thanks: 791
Thanked 4,977 Times in 3,899 Posts
Default

A setting of 8 means that php-fcgi will start 8 processes for every apache child, so your setup uses 8 times of ram while the apache fcgi module is only able to use the first child process anyway.

Quote:
It was set to 8, so I have changed it now. Any way to verify that setting?
The ram usage should drop for every website where you applied that setting.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
itsnedkeren (23rd November 2010)
  #7  
Old 23rd November 2010, 14:39
itsnedkeren itsnedkeren is offline
Senior Member
 
Join Date: May 2009
Location: Denmark
Posts: 128
Thanks: 32
Thanked 10 Times in 10 Posts
 
Default

Excellent, thanks alot

And I found the fcgi config has also changed and uncomment the child section

/var/www/php-fcgi-scripts/web11/.php-fcgi-starter:
Code:
#!/bin/sh
PHPRC="/etc/php5/cgi/"
export PHPRC
PHP_DOCUMENT_ROOT="/var/www/clients/client0/web11"
export PHP_DOCUMENT_ROOT
# The variable PHP_FCGI_CHILDREN is onyl useful for lighty or nginx as apache 
# mod_fcgi will control the number of childs themself and never use the additional processes.
# PHP_FCGI_CHILDREN=1
# export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_MAX_REQUESTS
exec /usr/bin/php-cgi \
 $1
__________________
Best regards

Jim
Reply With Quote
Reply

Bookmarks

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPC 3.0.3 - Mail not working :( itsnedkeren Installation/Configuration 5 14th October 2010 16:46
ISPC 3.0.3 beta1, webdav users and paths damir General 5 26th August 2010 17:23
change fast cgi to mod php in ispconfig 3 clip Installation/Configuration 2 13th August 2009 09:12
Haproxy + Lighttpd / fast cgi EazySnatch Installation/Configuration 0 29th September 2008 16:22
few basic ISPC newbie questions janimir General 7 2nd April 2007 11:18


All times are GMT +2. The time now is 06:53.


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