
19th July 2010, 12:55
|
|
Senior Member
|
|
Join Date: Jul 2010
Posts: 123
Thanks: 5
Thanked 0 Times in 0 Posts
|
|
from the 2nd link here is the suggestion:
Code:
BusyTimeout 10800
ProcessLifeTime 10800
IPCConnectTimeout 20
IPCCommTimeout 10800
MaxRequestsPerProcess -1
should increase these values, MaxRequestsPerProcess I do not think it's normal?
I wonder why the server is slow to load, then there's the max it only 300 members online ...
|

19th July 2010, 12:57
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 32,068
Thanks: 697
Thanked 4,248 Times in 3,260 Posts
|
|
Quote:
|
I wonder why the server is slow to load, then there's the max it only 300 members online ...
|
This may have many different reasons incl. mysql configuration etc. Which exact setup and php method have you used before for this site and have you used a php opcode cache?
|

19th July 2010, 13:02
|
|
Senior Member
|
|
Join Date: Jul 2010
Posts: 123
Thanks: 5
Thanked 0 Times in 0 Posts
|
|
here my config :
my phpinfo : http://www.dimadimaraja.info/pret.php
server status : http://www.dimadimaraja.info/status.php (mysql variables ...)
my /etc/apache2/sites-available/dimadimaraja.info.vhost
Code:
<Directory /var/www/dimadimaraja.info>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>
<VirtualHost *:80>
DocumentRoot /var/www/dimadimaraja.info/web
ServerName dimadimaraja.info
ServerAlias *.dimadimaraja.info
ServerAlias site.dimadimaraja.info
ServerAdmin webmaster@dimadimaraja.info
ErrorLog /var/log/ispconfig/httpd/dimadimaraja.info/error.log
<Directory /var/www/dimadimaraja.info/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
# ssi enabled
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Options +Includes
</Directory>
<Directory /var/www/clients/client3/web5/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
# ssi enabled
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Options +Includes
</Directory>
# cgi enabled
<Directory /var/www/clients/client3/web5/cgi-bin>
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /var/www/clients/client3/web5/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
# suexec enabled
SuexecUserGroup web5 client3
# Clear PHP settings of this website
<FilesMatch "\.ph(p3?|tml)$">
SetHandler None
</FilesMatch>
# php as fast-cgi enabled
<IfModule mod_fcgid.c>
# SocketPath /tmp/fcgid_sock/
IdleTimeout 3600
ProcessLifeTime 7200
# MaxProcessCount 1000
DefaultMinClassProcessCount 3
DefaultMaxClassProcessCount 100
IPCConnectTimeout 8
IPCCommTimeout 360
BusyTimeout 300
</IfModule>
<Directory /var/www/dimadimaraja.info/web>
AddHandler fcgid-script .php .php3 .php4 .php5
FCGIWrapper /var/www/php-fcgi-scripts/web5/.php-fcgi-starter .php
Options +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/clients/client3/web5/web>
AddHandler fcgid-script .php .php3 .php4 .php5
FCGIWrapper /var/www/php-fcgi-scripts/web5/.php-fcgi-starter .php
Options +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
# add support for apache mpm_itk
<IfModule mpm_itk_module>
AssignUserId web5 client3
</IfModule>
</VirtualHost>
it seems normal to me ...
|

19th July 2010, 13:05
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 32,068
Thanks: 697
Thanked 4,248 Times in 3,260 Posts
|
|
I meant the configuration that you had before you switched the site to the ispconfig server?
|

19th July 2010, 13:16
|
|
Senior Member
|
|
Join Date: Jul 2010
Posts: 123
Thanks: 5
Thanked 0 Times in 0 Posts
|
|
|

19th July 2010, 13:34
|
|
Senior Member
|
|
Join Date: Jul 2010
Posts: 123
Thanks: 5
Thanked 0 Times in 0 Posts
|
|
I noticed a few things:
http://www.dimadimaraja.info/status.php?mysql_info=1
Code:
Max_used_connections: 114
max_connections: 151
max_user_connections: 0
connect_timeout: 10
it's small no ? these mysql values should not be increased ?
Last edited by 007007; 19th July 2010 at 14:33.
|

19th July 2010, 17:02
|
|
Senior Member
|
|
Join Date: Jul 2010
Posts: 123
Thanks: 5
Thanked 0 Times in 0 Posts
|
|
searching in the apache2 error logs, this is what I found:
Code:
[Sat Jul 17 17:34:57 2010] [warn] child process 7762 still did not exit, sending a SIGTERM
[Sat Jul 17 17:34:57 2010] [warn] child process 7763 still did not exit, sending a SIGTERM
[Sat Jul 17 17:34:57 2010] [warn] child process 7614 still did not exit, sending a SIGTERM
[Sat Jul 17 17:34:57 2010] [warn] child process 7616 still did not exit, sending a SIGTERM
[Sat Jul 17 17:34:57 2010] [warn] child process 7617 still did not exit, sending a SIGTERM
[Sat Jul 17 17:34:57 2010] [warn] child process 7765 still did not exit, sending a SIGTERM
[Sat Jul 17 17:34:57 2010] [warn] child process 7621 still did not exit, sending a SIGTERM
[Sat Jul 17 17:34:57 2010] [warn] child process 7633 still did not exit, sending a SIGTERM
[Sat Jul 17 17:34:57 2010] [warn] child process 7634 still did not exit, sending a SIGTERM
[Sat Jul 17 17:34:57 2010] [warn] child process 7766 still did not exit, sending a SIGTERM
[Sat Jul 17 17:34:57 2010] [warn] child process 7646 still did not exit, sending a SIGTERM
[Sat Jul 17 17:34:57 2010] [warn] child process 7647 still did not exit, sending a SIGTERM
[Sat Jul 17 17:34:58 2010] [error] child process 7660 still did not exit, sending a SIGKILL
[Sat Jul 17 17:34:58 2010] [error] child process 6708 still did not exit, sending a SIGKILL
[Sat Jul 17 17:34:58 2010] [error] child process 6424 still did not exit, sending a SIGKILL
[Sat Jul 17 17:34:58 2010] [error] child process 5613 still did not exit, sending a SIGKILL
[Sat Jul 17 17:34:58 2010] [error] child process 5876 still did not exit, sending a SIGKILL
[Sat Jul 17 17:34:58 2010] [error] child process 5879 still did not exit, sending a SIGKILL
[Sat Jul 17 17:34:58 2010] [error] child process 6094 still did not exit, sending a SIGKILL
[Sat Jul 17 17:34:58 2010] [error] child process 6995 still did not exit, sending a SIGKILL
[Sat Jul 17 17:34:58 2010] [error] child process 7570 still did not exit, sending a SIGKILL
[Sat Jul 17 17:34:58 2010] [error] child process 5624 still did not exit, sending a SIGKILL
Code:
[Sat Jul 17 16:57:40 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(2836) exit(idle timeout), terminated by calling exit(), return code: 0
[Sat Jul 17 16:57:40 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(2171) exit(idle timeout), terminated by calling exit(), return code: 0
[Sat Jul 17 16:57:40 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(2797) exit(idle timeout), terminated by calling exit(), return code: 0
[Sat Jul 17 16:57:40 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(2832) exit(idle timeout), terminated by calling exit(), return code: 0
[Sat Jul 17 16:57:40 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(706) exit(idle timeout), terminated by calling exit(), return code: 0
[Sat Jul 17 16:57:40 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(2822) exit(idle timeout), terminated by calling exit(), return code: 0
[Sat Jul 17 16:57:40 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(2297) exit(idle timeout), terminated by calling exit(), return code: 0
[Sat Jul 17 16:57:40 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(2827) exit(idle timeout), terminated by calling exit(), return code: 0
[Sat Jul 17 16:57:40 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(2810) exit(idle timeout), terminated by calling exit(), return code: 0
[Sat Jul 17 16:57:40 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(2798) exit(idle timeout), terminated by calling exit(), return code: 0
[Sat Jul 17 16:57:40 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(1066) exit(idle timeout), terminated by calling exit(), return code: 0
[Sat Jul 17 16:57:40 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(508) exit(idle timeout), terminated by calling exit(), return code: 0
[Sat Jul 17 16:57:40 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(2026) exit(idle timeout), terminated by calling exit(), return code: 0
[Sat Jul 17 16:57:40 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(2814) exit(idle timeout), terminated by calling exit(), return code: 0
[Sat Jul 17 16:57:4
[Sat Jul 17 16:49:27 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(2015) exit(busy timeout), get stop signal 9
[Sat Jul 17 16:49:27 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(1064) exit(busy timeout), get stop signal 9
[Sat Jul 17 16:49:27 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(695) exit(busy timeout), get stop signal 9
[Sat Jul 17 16:49:27 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(2007) exit(busy timeout), get stop signal 9
[Sat Jul 17 16:49:27 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(701) exit(busy timeout), get stop signal 9
[Sat Jul 17 16:49:27 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(32578) exit(busy timeout), get stop signal 9
[Sat Jul 17 16:49:27 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(1908) exit(busy timeout), get stop signal 9
[Sat Jul 17 16:49:27 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(1919) exit(busy timeout), get stop signal 9
[Sat Jul 17 16:49:27 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(32649) exit(busy timeout), get stop signal 9
[Sat Jul 17 16:49:27 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(1278) exit(busy timeout), get stop signal 9
[Sat Jul 17 16:49:27 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(2118) exit(busy timeout), get stop signal 9
[Sat Jul 17 16:49:27 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(2119) exit(busy timeout), get stop signal 9
[Sat Jul 17 16:49:27 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(2122) exit(busy timeout), get stop signal 9
[Sat Jul 17 16:49:27 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(2123) exit(busy timeout), get stop signal 9
[Sat Jul 17 16:49:27 2010] [notice] mod_fcgid: process /var/www/dimadimaraja.info/web/index.php(2128) exit(busy timeout), get stop signal 9
Code:
[Sat Jul 17 16:49:23 2010] [notice] mod_fcgid: too much /var/www/dimadimaraja.info/web/index.php process(current:100, max:100), skip the spawn request
[Sat Jul 17 16:49:23 2010] [notice] mod_fcgid: too much /var/www/dimadimaraja.info/web/index.php process(current:100, max:100), skip the spawn request
[Sat Jul 17 16:49:23 2010] [notice] mod_fcgid: too much /var/www/dimadimaraja.info/web/index.php process(current:100, max:100), skip the spawn request
[Sat Jul 17 16:49:23 2010] [notice] mod_fcgid: too much /var/www/dimadimaraja.info/web/forum/index.php process(current:100, max:100), skip the spawn request
[Sat Jul 17 16:49:23 2010] [notice] mod_fcgid: too much /var/www/dimadimaraja.info/web/forum/index.php process(current:100, max:100), skip the spawn request
[Sat Jul 17 16:49:23 2010] [notice] mod_fcgid: too much /var/www/dimadimaraja.info/web/forum/index.php process(current:100, max:100), skip the spawn request
[Sat Jul 17 16:49:23 2010] [notice] mod_fcgid: too much /var/www/dimadimaraja.info/web/forum/index.php process(current:100, max:100), skip the spawn request
[Sat Jul 17 16:49:23 2010] [notice] mod_fcgid: too much /var/www/dimadimaraja.info/web/index.php process(current:100, max:100), skip the spawn request
[Sat Jul 17 16:49:23 2010] [notice] mod_fcgid: too much /var/www/dimadimaraja.info/web/forum/index.php process(current:100, max:100), skip the spawn request
[Sat Jul 17 16:49:23 2010] [notice] mod_fcgid: too much /var/www/dimadimaraja.info/web/forum/index.php process(current:100, max:100), skip the spawn request
[Sat Jul 17 16:49:23 2010] [notice] mod_fcgid: too much /var/www/dimadimaraja.info/web/forum/index.php process(current:100, max:100), skip the spawn request
[Sat Jul 17 16:49:23 2010] [notice] mod_fcgid: too much /var/www/dimadimaraja.info/web/forum/index.php process(current:100, max:100), skip the spawn request
[Sat Jul 17 16:49:23 2010] [notice] mod_fcgid: too much /var/www/dimadimaraja.info/web/forum/index.php process(current:100, max:100), skip the spawn request
[Sat Jul 17 16:49:23 2010] [notice] mod_fcgid: too much /var/www/dimadimaraja.info/web/forum/index.php process(current:100, max:100), skip the spawn request
[Sat Jul 17 16:49:23 2010] [notice] mod_fcgid: too much /var/www/dimadimaraja.info/web/forum/index.php process(current:100, max:100), skip the spawn request
[Sat Jul 17 16:49:23 2010] [notice] mod_fcgid: too much /var/www/dimadimaraja.info/web/index.php process(current:100, max:100), skip the spawn request
[Sat Jul 17 16:49:23 2010] [notice] mod_fcgid: too much /var/www/dimadimaraja.info/web/forum/index.php process(current:100, max:100), skip the spawn request
[Sat Jul 17 16:49:23 2010] [notice] mod_fcgid: too much /var/www/dimadimaraja.info/web/forum/index.php process(current:100, max:100), skip the spawn request
[Sat Jul 17 16:49:23 2010] [notice] mod_fcgid: too much /var/www/dimadimaraja.info/web/index.php process(current:100, max:100), skip the spawn request
[Sat Jul 17 16:49:23 2010] [notice] mod_fcgid: too much /var/www/dimadimaraja.info/web/index.php process(current:100, max:100), skip the spawn request
these errors are repeated hundreds of times ...
|

20th July 2010, 10:42
|
|
Senior Member
|
|
Join Date: Jul 2010
Posts: 123
Thanks: 5
Thanked 0 Times in 0 Posts
|
|
Hi all,
after hours of searching this is what I found:
in the /etc/apache2/sites-available/yoursite.info.vhost
Search and replace
Code:
<IfModule mod_fcgid.c>
# SocketPath /tmp/fcgid_sock/
IdleTimeout 3600
ProcessLifeTime 7200
# MaxProcessCount 1000
DefaultMinClassProcessCount 3
DefaultMaxClassProcessCount 100
IPCConnectTimeout 8
IPCCommTimeout 360
BusyTimeout 300
</IfModule>
by
Code:
<IfModule mod_fcgid.c>
# SocketPath /tmp/fcgid_sock/
IdleTimeout 6000
ProcessLifeTime 10000
# MaxProcessCount 1000
DefaultMinClassProcessCount 3
DefaultMaxClassProcessCount 400
IPCConnectTimeout 50
IPCCommTimeout 600
BusyTimeout 600
</IfModule>
Just a confirmation from a professional:
MaxRequestsPerProcess -1
does not exist in the config? he should be added ?
Now for mysql configuration :
Code:
Max_used_connections: 114
max_connections: 151
max_user_connections: 0
connect_timeout: 10
these values should be increased or not ? what do you thinks ?
------------------------
Original idea :
Quote:
I’m using a global configuration file for the parameterization of mod_fcgid. In my httpd.conf there is an include to a file named php.conf (where the mod_fcgid is loaded and configured). In this last file and after loading the module, I added :
Code:
#Gallery2 Admin Config Begin
BusyTimeout 10800
ProcessLifeTime 10800
IPCConnectTimeout 20
IPCCommTimeout 10800
MaxRequestsPerProcess -1
#Gallery2 Admin Config End
You should notice that you could also tune these parameters for each virtual host separately by simple adding these configuration parameters for each virtual host.
This is a configuration example for keeping the script alive for 10800 seconds, which is equivalent to 3 hours. Perhaps the most determinant values are BusyTimeout, IPCCommTimeout and MaxRequestsPerProcess. I think that ProcessLifeTime could be redundant; I have not yet made the test without it.
BusyTimeout and IPCCommTimeout are both going to determine the execution duration of the task. The one with the lower value will trigger first. BusyTimeout will terminate the script if a single request takes longer than busy timeout. IPCCommTimeout is the communication timeout to a fastcgi application. IPCConnectTimeout will handle the connection timeout only; the execution time does not depend on it.
MaxRequestsPerProcess is the last parameter that got my attention, and the one that finally made things work. This parameter was the responsible for this kill:
Code:
[Thu Oct 09 15:48:20 2008] [warn] mod_fcgid: process 28922 graceful kill fail, sending SIGKILL
[Thu Oct 09 15:48:20 2008] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Thu Oct 09 15:48:20 2008] [warn] (104)Connection reset by peer: mod_fcgid: ap_pass_brigade failed in handle_request function
[Thu Oct 09 15:48:20 2008] [error] [client xxx.xxx.xxx.xxx] File does not exist: /home2/amazeika/public_html/mifondo/gallery2/500.shtml, referer: http://gallery.mifondo.net/main.php?...ame=%C3%A1lbum
By default this parameter is usually set to 500 for a good reason (http://fastcgi.coremail.cn/doc.htm). However, this also means that after 500 requests, the PHP process was condemned to die taking with him my precious gallery2 task. MaxRequestsPerProcess -1 means fastcgi process will not exit no matter how many requests it has handled, which is exactly what we are looking for. However, be aware that PHP errors may arise for new incoming requests when the PHP cleanup is performed, which is by default after 500 requests. This is a known problem caused by a race condition when running PHP in fastcgi mode through mod_fcgi under heavy server loads (http://fastcgi.coremail.cn/doc.htm for more information). This was corrected in mod_fcgid by adding MaxRequestsPerProcess, which by default is set to 500 to match PHP cleanup. This will kill the process after 500 requests, not good for us though. Perhaps changing the default PHP cleanup value to match MaxRequestsPerProcess (big enough) will ensure total stability while using this config.
Anyways, my final advice to you regarding this configuration is to only use it when performing heavy administrative and maintenance tasks. By default, MaxRequestsPerProcess 500 will ensure proper functioning of PHP in fastcgi mode at all times. It is also wiser to limit the execution time of scripts.
Notice that in my case, I always lost connection with the browser. However, tasks keep running in the background and get the job done.
I hope this thread will help some of you, as for me, it represents the solution to the only problem that I wasn’t able to deal with. I thank the developers for this magnificent piece of art. Excellent work !!!.
Thank you nivekiam and floridave for all your support and for following this thread with interest. Thank you guys.
If someone find that any of the information in this post is incorrect, please do not hesitate to point it out. As I said earlier, this is all new stuff for me, and it's my interpretation from all that I have learned this last week.
|
Quote:
Increasing the IPCCommTimeout within the vhost directive solved the following error for me:
[Tue Jan 22 17:36:41 2008] [warn] mod_fcgid: read data timeout in 40 seconds
[Tue Jan 22 17:36:41 2008] [error] [client 10.20.30.40] Premature end of script headers: index.php
|
Quote:
|
sometimes this errors are caused by bots (baidu, google)
|
thx all for your help
|

8th August 2010, 17:04
|
|
Senior Member
|
|
Join Date: Jul 2010
Posts: 123
Thanks: 5
Thanked 0 Times in 0 Posts
|
|
I think I found where is the problem, the configuration of my server:
Intel (R) Celeron (R) CPU 1.80GHz
RAM: 2GB
I'll get another server: Kimsufi 750G
http://www.kimsufi.com/ks/

|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 10:37.
|
Recent comments
1 day 12 hours ago
1 day 14 hours ago
2 days 2 hours ago
2 days 5 hours ago
2 days 9 hours ago
2 days 16 hours ago
3 days 1 hour ago
3 days 3 hours ago
3 days 11 hours ago
3 days 12 hours ago