server loads up and is VERY slow

Discussion in 'General' started by jag7720, Mar 31, 2008.

  1. jag7720

    jag7720 New Member

    A few hours I restart ispconfig_server my server slows to a crawl. It take a long time for web pages to come up and even to log into the server via ssh.

    Here is one of the sites on the server
    http://www.kchotspots.com/

    You can see how slow it is.

    I just upgraded to 2.2.21 and that did not resolve the problem.

    Intel(R) Celeron(R) CPU 2.53GHz
    Mem: total= 506380 used= 499848 free= 6532

    I lowered a lot of the following and it seemed to help... but over a few hours the system degrades

    <IfModule prefork.c>
    StartServers 2
    MinSpareServers 4
    MaxSpareServers 8
    ServerLimit 20
    MaxClients 16
    MaxRequestsPerChild 512
    </IfModule>
    <IfModule worker.c>
    StartServers 2
    MaxClients 150
    MinSpareThreads 25
    MaxSpareThreads 75
    ThreadsPerChild 25
    MaxRequestsPerChild 0
    </IfModule>




    Anyone know what might be going on and how to fix it?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please check with the "top" command which processes are consuming the CPU cycles.
     
  3. jag7720

    jag7720 New Member

    8611 apache 25 0 66928 42m 4424 R 92.1 8.7 0:36.12 httpd

    ... and there isn't even any traffic ...

    I opened up two terminals and looked at top with one and tail -f the access_logs ... no traffic comming in
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Any errors in Apache's error log?
    Which distribution are you using? How did you install Apache?
     
  5. jag7720

    jag7720 New Member

    This is the tail of error_log

    [Tue Apr 01 11:02:10 2008] [error] an unknown filter was not added: PHP
    [Tue Apr 01 11:02:10 2008] [error] an unknown filter was not added: PHP
    [Tue Apr 01 11:02:14 2008] [error] an unknown filter was not added: PHP
    [Tue Apr 01 11:02:14 2008] [error] an unknown filter was not added: PHP
    [Tue Apr 01 11:03:34 2008] [error] an unknown filter was not added: PHP
    [Tue Apr 01 11:03:34 2008] [error] an unknown filter was not added: PHP
    [Tue Apr 01 11:03:35 2008] [error] an unknown filter was not added: PHP
    [Tue Apr 01 11:03:35 2008] [error] an unknown filter was not added: PHP
    [Tue Apr 01 11:04:52 2008] [error] an unknown filter was not added: PHP
    [Tue Apr 01 11:04:52 2008] [error] an unknown filter was not added: PHP
    [Tue Apr 01 11:06:36 2008] [error] an unknown filter was not added: PHP
    [Tue Apr 01 11:06:36 2008] [error] an unknown filter was not added: PHP
    Allowed memory size of 33554432 bytes exhausted (tried to allocate 0 bytes)


    I am using Centos 4
    I installed Apache using the ISPConfig install process.

    from my php.ini http://the-greenes.net/info.php
    max_execution_time = 300
    max_input_time = 600
    memory_limit = 64M
     
    Last edited: Apr 1, 2008
  6. falko

    falko Super Moderator Howtoforge Staff

    http://www.howtoforge.com/forums/showpost.php?p=60042&postcount=5


    Please increase the memory limit in your php.ini and restart Apache.
     
  7. jag7720

    jag7720 New Member

    I figured out that PHP filter thing... I doubt that is causing the slowness

    As far as the memory... you want me to increase it from 64M? Default php.ini is only 8M. How much does it need? I only have 512 in the system
    33554432 bytes is 32mb and I had it set to 64M
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    How large is your swap partition? If you have just 512 MB ram, you should have at least 2 GB swap space.

    Also you should consider to add more ram, 512 MB is really low.
     
  9. jag7720

    jag7720 New Member

    top - 09:02:15 up 9 days, 17:05, 1 user, load average: 1.53, 1.44, 1.47
    Tasks: 86 total, 2 running, 83 sleeping, 0 stopped, 1 zombie
    Cpu(s): 97.7% us, 1.0% sy, 0.0% ni, 0.0% id, 1.3% wa, 0.0% hi, 0.0% si
    Mem: 506380k total, 393308k used, 113072k free, 8156k buffers
    Swap: 1052248k total, 81664k used, 970584k free, 255912k cached

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    13240 apache 25 0 67796 46m 4148 R 89.4 9.3 1:25.97 httpd


    I'm working on getting two more gig in it. The thing is, I don't have a lot of traffic and yet it still slows to a crawl.... after a restart of apache, it clears up for a while.
     
  10. falko

    falko Super Moderator Howtoforge Staff

    Do you use any .htaccess files where you set another value for the memory limit than the one in your php.ini?
     
  11. jag7720

    jag7720 New Member

    Not that I am aware of.... Unless ISPConfig adds them.
     
  12. Feanwulf

    Feanwulf New Member

    which modules did your apache2 load?

    I had some problems with load some days ago because of mod_security!
     
  13. jag7720

    jag7720 New Member

  14. Feanwulf

    Feanwulf New Member

    Your Loaded Modules:
    core prefork http_core mod_so mod_access mod_auth mod_auth_anon mod_auth_dbm mod_auth_digest util_ldap mod_auth_ldap mod_include mod_log_config mod_env mod_mime_magic mod_cern_meta mod_expires mod_deflate mod_headers mod_usertrack mod_setenvif mod_mime mod_dav mod_status mod_autoindex mod_asis mod_info mod_dav_fs mod_vhost_alias mod_negotiation mod_dir mod_imap mod_actions mod_speling mod_userdir mod_alias mod_rewrite mod_proxy proxy_ftp proxy_http proxy_connect mod_cache mod_suexec mod_disk_cache mod_file_cache mod_mem_cache mod_cgi mod_perl sapi_apache2 mod_python mod_ssl

    my loaded modules:
    core mod_log_config mod_logio prefork http_core mod_so mod_actions mod_alias mod_auth_basic mod_authn_file mod_authz_default mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi mod_dir mod_env mod_fcgid mod_include mod_mime mod_negotiation mod_php5 mod_rewrite mod_setenvif mod_ssl mod_status mod_suexec mod_unique_id

    ---
    so i think you could a2dismod some of your modules that you (your customers) do not need! Every module takes some memory.
     
  15. jag7720

    jag7720 New Member

    Strange... I don't seem to have a2dismod on my server... and yum can't find it to install. Where do I get this?
     
  16. jag7720

    jag7720 New Member

    Never mind... I'll just edit the httpd.conf
     
  17. falko

    falko Super Moderator Howtoforge Staff

    a2dismod is a Debian/Ubuntu tool. It doesn't exist on Fedora/CentOS.
     

Share This Page