Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 31st January 2012, 10:22
Skyflash Skyflash is offline
Member
 
Join Date: Sep 2011
Posts: 56
Thanks: 4
Thanked 2 Times in 2 Posts
Send a message via Skype™ to Skyflash
Default Problem with a site that kills my server

(sorry for my bad english)

I have a ISPConfig 3 installation on a VPS i configured my own
I've configured 6-7 sites, but i'm really using only one, my personal blog (http://www.skyflash.it). I'm having a strange trouble on it

When i publish a "normal" post that contains no external links, everything goes well. When i publish a post that contains external links, trackbacks or internal links with the full address (ie: http://www.skyflash.it/linked-older-post), my server hangs

"Top" tells me that the server consumes ALL the 2GB ram, and the CPU goes to 99% of the wait process



So i have to restart apache2 service (which requires maaaaaany time, because the server in on heavy load). After that, the server returns in good state. Also, i have to manually restart clamav-daemon and freshclam processes that die unexpectedly

I'm using Fast-CGI mode and i really have no idea where the problem is
Reply With Quote
Sponsored Links
  #2  
Old 31st January 2012, 10:26
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,177
Thanks: 829
Thanked 5,414 Times in 4,257 Posts
Default

1) Which CMS system do you use in that website?
2) Do you get any errors in the error.log of that site?
3) Which Linux distribution is used on the server?
4) Are the nameservers that are listed in /etc/resolv.conf corect an reachable from the server?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 31st January 2012, 10:30
Skyflash Skyflash is offline
Member
 
Join Date: Sep 2011
Posts: 56
Thanks: 4
Thanked 2 Times in 2 Posts
Send a message via Skype™ to Skyflash
Default

Quote:
Originally Posted by till View Post
1) Which CMS system do you use in that website?
Wordpress 3.3.1

Quote:
2) Do you get any errors in the error.log of that site?
Code:
root@server01:/var/www/skyflash.it/log# tail -f error.log
[Tue Jan 31 10:05:21 2012] [warn] [client 176.31.136.82] mod_fcgid: read data timeout in 360 seconds
[Tue Jan 31 10:05:21 2012] [error] [client 176.31.136.82] Premature end of script headers: wp-cron.php
[Tue Jan 31 10:05:21 2012] [warn] [client 176.31.136.82] mod_fcgid: read data timeout in 360 seconds
[Tue Jan 31 10:05:21 2012] [error] [client 176.31.136.82] Premature end of script headers: wp-cron.php
[Tue Jan 31 10:05:21 2012] [warn] [client 176.31.136.82] mod_fcgid: read data timeout in 360 seconds
[Tue Jan 31 10:05:22 2012] [error] [client 176.31.136.82] Premature end of script headers: wp-cron.php
[Tue Jan 31 10:05:22 2012] [warn] [client 176.31.136.82] mod_fcgid: read data timeout in 360 seconds
[Tue Jan 31 10:05:22 2012] [error] [client 176.31.136.82] Premature end of script headers: wp-cron.php
[Tue Jan 31 10:05:24 2012] [warn] [client 176.31.136.82] mod_fcgid: read data timeout in 360 seconds
[Tue Jan 31 10:05:24 2012] [error] [client 176.31.136.82] Premature end of script headers: wp-cron.php
Quote:
3) Which Linux distribution is used on the server?
Ubuntu 11.10 x64, on a VmWare ESX node

Quote:
4) Are the nameservers that are listed in /etc/resolv.conf corect an reachable from the server?
Code:
root@server01:/etc# more /etc/resolv.conf
nameserver 127.0.0.1
nameserver 213.186.33.99
nameserver 208.67.222.222
nameserver 8.8.8.8
Reply With Quote
  #4  
Old 31st January 2012, 10:40
Skyflash Skyflash is offline
Member
 
Join Date: Sep 2011
Posts: 56
Thanks: 4
Thanked 2 Times in 2 Posts
Send a message via Skype™ to Skyflash
Default

I'm trying the same thing on a test site i developed for test purposes (http://www.skyflashtest.biz) and everything seems ok

The test site is brand new, a standard installation with about 10 posts. My blog is a site with 1000 post and 3000 comments, and a db size about of 3MB (tgz)

Do you think may be related to a max memory reserved for MySQL istance?
Reply With Quote
  #5  
Old 31st January 2012, 10:59
Skyflash Skyflash is offline
Member
 
Join Date: Sep 2011
Posts: 56
Thanks: 4
Thanked 2 Times in 2 Posts
Send a message via Skype™ to Skyflash
Default

I have another log. Now the server is on heavy load (no post published), and this is the error.log
Code:
[Tue Jan 31 10:49:04 2012] [warn] [client 85.17.73.40] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server, referer: http://www.skyflash.it/af/2005/03/colori-ds
[Tue Jan 31 10:49:20 2012] [warn] [client 85.17.73.40] (104)Connection reset by peer: mod_fcgid: ap_pass_brigade failed in handle_request_ipc function, referer: http://www.skyflash.it/af/2005/03/colori-ds
[Tue Jan 31 10:49:29 2012] [warn] [client 85.17.73.40] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server, referer: http://www.skyflash.it/af/2006/09/sony-ps3-senza-hdmi
[Tue Jan 31 10:49:30 2012] [warn] [client 85.17.73.40] (104)Connection reset by peer: mod_fcgid: ap_pass_brigade failed in handle_request_ipc function, referer: http://www.skyflash.it/af/2006/09/sony-ps3-senza-hdmi
[Tue Jan 31 10:49:35 2012] [warn] [client 85.17.73.40] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server, referer: http://www.skyflash.it/af/2006/12/lancio-del-wii
[Tue Jan 31 10:49:36 2012] [warn] [client 85.17.73.40] (104)Connection reset by peer: mod_fcgid: ap_pass_brigade failed in handle_request_ipc function, referer: http://www.skyflash.it/af/2006/12/lancio-del-wii
I remember some months ago i installaed php-apc on the server, because it was requested by the translation plugin i installed on the blog. Maybe this pear extension the responsible?
Reply With Quote
  #6  
Old 31st January 2012, 11:05
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,177
Thanks: 829
Thanked 5,414 Times in 4,257 Posts
Default

How much memory do you allow for php processes in php.ini? Try to increae it to 128 or even 256MB and restart apache if it is set to a lower value at the moment.

Regarding the php binary cache, I use php5-xcache (available as DEbian and Ubuntu package from the debian repositories) on my wordpress servers. I would try to uninstall apc and try xcache instead.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 31st January 2012, 11:13
Skyflash Skyflash is offline
Member
 
Join Date: Sep 2011
Posts: 56
Thanks: 4
Thanked 2 Times in 2 Posts
Send a message via Skype™ to Skyflash
Default

Quote:
Originally Posted by till View Post
How much memory do you allow for php processes in php.ini? Try to increae it to 128 or even 256MB and restart apache if it is set to a lower value at the moment.
root@server01:/etc/php5/cgi# vi php.ini
Code:
;;;;;;;;;;;;;;;;;
; Miscellaneous ;
;;;;;;;;;;;;;;;;;

; Decides whether PHP may expose the fact that it is installed on the server
; (e.g. by adding its signature to the Web server header).  It is no security
; threat in any way, but it makes it possible to determine whether you use PHP
; on your server or not.
; http://php.net/expose-php
expose_php = On

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 300

; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts.
; Note: This directive is hardcoded to -1 for the CLI SAPI
; Default Value: -1 (Unlimited)
; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds)
; http://php.net/max-input-time
max_input_time = 60

; Maximum input variable nesting level
; http://php.net/max-input-nesting-level
;max_input_nesting_level = 64

; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 256M
It was to 256MB

Quote:
Regarding the php binary cache, I use php5-xcache (available as DEbian and Ubuntu package from the debian repositories) on my wordpress servers. I would try to uninstall apc and try xcache instead.
Ok, thank you. Now i've uninstalled apc and installed xcache
Reply With Quote
  #8  
Old 1st February 2012, 09:05
Skyflash Skyflash is offline
Member
 
Join Date: Sep 2011
Posts: 56
Thanks: 4
Thanked 2 Times in 2 Posts
Send a message via Skype™ to Skyflash
Default

The cache plugin has not resolved anything

In this moment the server is on heavy load. No post was published. I woke up this morning ad i've found the server locked.

Top returns me this:



22k zombie processes!!!
The CPU wait % is ok, but i've no free ram.

Can you help me, please?
Reply With Quote
  #9  
Old 1st February 2012, 09:42
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,177
Thanks: 829
Thanked 5,414 Times in 4,257 Posts
Default

Please post the vhost file of the affected website and the fcgi starter script of that site.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #10  
Old 1st February 2012, 10:56
Skyflash Skyflash is offline
Member
 
Join Date: Sep 2011
Posts: 56
Thanks: 4
Thanked 2 Times in 2 Posts
Send a message via Skype™ to Skyflash
 
Default

Code:
root@server01:/var/www/skyflash.it/web# vi /etc/apache2/sites-enabled/100-skyflash.it.vhost 
<Directory /var/www/skyflash.it>
    AllowOverride None
    Order Deny,Allow
    Deny from all
</Directory>

<VirtualHost *:80>
      DocumentRoot /var/www/skyflash.it/web
  
    ServerName skyflash.it
    ServerAlias www.skyflash.it
    ServerAdmin webmaster@skyflash.it

    ErrorLog /var/log/ispconfig/httpd/skyflash.it/error.log


    ErrorDocument 400 /error/400.html
    ErrorDocument 401 /error/401.html
    ErrorDocument 403 /error/403.html
    ErrorDocument 404 /error/404.html
    ErrorDocument 405 /error/405.html
    ErrorDocument 500 /error/500.html
    ErrorDocument 502 /error/502.html
    ErrorDocument 503 /error/503.html

    <IfModule mod_ssl.c>
    </IfModule>
    <Directory /var/www/skyflash.it/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/client1/web2/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
        
        # ssi enabled
        AddType text/html .shtml
        AddOutputFilter INCLUDES .shtml
        Options +Includes
    </Directory>

    <IfModule mod_ruby.c>
      <Directory /var/www/skyflash.it/web>
        Options +ExecCGI
      </Directory>
      RubyRequire apache/ruby-run
      #RubySafeLevel 0
      <Files *.rb>
        SetHandler ruby-object
        RubyHandler Apache::RubyRun.instance
      </Files>
      <Files *.rbx>
        SetHandler ruby-object
        RubyHandler Apache::RubyRun.instance
      </Files>
    </IfModule>


    # cgi enabled
	<Directory /var/www/clients/client1/web2/cgi-bin>
      Order allow,deny
      Allow from all
    </Directory>
    ScriptAlias  /cgi-bin/ /var/www/clients/client1/web2/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    # suexec enabled
    SuexecUserGroup web2 client1
    # Clear PHP settings of this website
    <FilesMatch "\.ph(p3?|tml)$">
        SetHandler None
    </FilesMatch>
    # php as fast-cgi enabled
	# For config options see: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
    <IfModule mod_fcgid.c>
        FcgidIdleTimeout 300
        FcgidProcessLifeTime 3600
        # FcgidMaxProcesses 1000
        FcgidMinProcessesPerClass 0
        FcgidMaxProcessesPerClass 100
        FcgidConnectTimeout 3
        FcgidIOTimeout 360
        FcgidBusyTimeout 300
    </IfModule>
    <Directory /var/www/skyflash.it/web>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /var/www/php-fcgi-scripts/web2/.php-fcgi-starter .php
        Options +ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /var/www/clients/client1/web2/web>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /var/www/php-fcgi-scripts/web2/.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 web2 client1
    </IfModule>

    <IfModule mod_dav_fs.c>
	  # Do not execute PHP files in webdav directory
      <Directory /var/www/clients/client1/web2/webdav>
	    <FilesMatch "\.ph(p3?|tml)$">
          SetHandler None
        </FilesMatch>
      </Directory>
      # DO NOT REMOVE THE COMMENTS!
      # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
      # WEBDAV BEGIN
      # WEBDAV END
    </IfModule>


</VirtualHost>
<VirtualHost *:443>
      DocumentRoot /var/www/skyflash.it/web
  
    ServerName skyflash.it
    ServerAlias www.skyflash.it
    ServerAdmin webmaster@skyflash.it

    ErrorLog /var/log/ispconfig/httpd/skyflash.it/error.log


    ErrorDocument 400 /error/400.html
    ErrorDocument 401 /error/401.html
    ErrorDocument 403 /error/403.html
    ErrorDocument 404 /error/404.html
    ErrorDocument 405 /error/405.html
    ErrorDocument 500 /error/500.html
    ErrorDocument 502 /error/502.html
    ErrorDocument 503 /error/503.html

    <IfModule mod_ssl.c>
	SSLEngine on
    SSLCertificateFile /var/www/clients/client1/web2/ssl/skyflash.it.crt
    SSLCertificateKeyFile /var/www/clients/client1/web2/ssl/skyflash.it.key
    </IfModule>
    <Directory /var/www/skyflash.it/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/client1/web2/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
        
        # ssi enabled
        AddType text/html .shtml
        AddOutputFilter INCLUDES .shtml
        Options +Includes
    </Directory>

    <IfModule mod_ruby.c>
      <Directory /var/www/skyflash.it/web>
        Options +ExecCGI
      </Directory>
      RubyRequire apache/ruby-run
      #RubySafeLevel 0
      <Files *.rb>
        SetHandler ruby-object
        RubyHandler Apache::RubyRun.instance
      </Files>
      <Files *.rbx>
        SetHandler ruby-object
        RubyHandler Apache::RubyRun.instance
      </Files>
    </IfModule>


    # cgi enabled
	<Directory /var/www/clients/client1/web2/cgi-bin>
      Order allow,deny
      Allow from all
    </Directory>
    ScriptAlias  /cgi-bin/ /var/www/clients/client1/web2/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    # suexec enabled
    SuexecUserGroup web2 client1
    # Clear PHP settings of this website
    <FilesMatch "\.ph(p3?|tml)$">
        SetHandler None
    </FilesMatch>
    # php as fast-cgi enabled
	# For config options see: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
    <IfModule mod_fcgid.c>
        FcgidIdleTimeout 300
        FcgidProcessLifeTime 3600
        # FcgidMaxProcesses 1000
        FcgidMinProcessesPerClass 0
        FcgidMaxProcessesPerClass 100
        FcgidConnectTimeout 3
        FcgidIOTimeout 360
        FcgidBusyTimeout 300
    </IfModule>
    <Directory /var/www/skyflash.it/web>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /var/www/php-fcgi-scripts/web2/.php-fcgi-starter .php
        Options +ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /var/www/clients/client1/web2/web>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /var/www/php-fcgi-scripts/web2/.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 web2 client1
    </IfModule>

    <IfModule mod_dav_fs.c>
	  # Do not execute PHP files in webdav directory
      <Directory /var/www/clients/client1/web2/webdav>
	    <FilesMatch "\.ph(p3?|tml)$">
          SetHandler None
        </FilesMatch>
      </Directory>
      # DO NOT REMOVE THE COMMENTS!
      # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
      # WEBDAV BEGIN
      # WEBDAV END
    </IfModule>


</VirtualHost>
Where i can find the fcgi starter script of the affected site?
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
Sending email issue lezelf Installation/Configuration 15 9th August 2011 11:20
MySQL Error Nolan Installation/Configuration 12 16th February 2011 02:15
Need some Hints to "The Perfect Server - Debian Lenny (Debian 5.0) [ISPConfig 3]" wahid HOWTO-Related Questions 10 25th August 2010 15:18
BIG Problem Postfix issue admins Installation/Configuration 11 13th November 2009 10:05
Webmail Relay Error palkat General 17 23rd April 2006 18:12


All times are GMT +2. The time now is 22:33.


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