The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help please! Apache and MySql forking!

Discussion in 'EasyApache' started by Ganga, Sep 26, 2005.

  1. Ganga

    Ganga Well-Known Member

    Joined:
    Oct 2, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    Hello everyone and thanks in advance for any help you may give.

    My server keeps locking up and slows down like a sloath...

    My sys admin has told me that the problem lies with the fact that Apache and MySql are forking, occupying about 30-40% of the resources.

    We have checked the server load, Apache is handling less than 200 requests per second.

    These are the info you may need:

    CPanel version: 10.8.0-RELEASE-8

    Apache version: 1.3.33

    MySQL version: 4.0.25-standard

    PHP version: 4.3.11

    The server is an Intel Celeron 1.7 Ghz with 1 Gb RAM

    The OS is Red Hat Enterprise 3 with kernel 2.4.21-4.0.1.EL

    Many thanks for any insight you may offer on this issue.

    Regards,

    Ganga
     
  2. OCX

    OCX Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    232
    Likes Received:
    0
    Trophy Points:
    16
    This could be happing for a number of reasons,

    For starters, make sure your server is harden, and firewall etc is installed

    optimize your my.cnf file

    update your software and such.. (ie php to 4.4.0 )

    update to the latest release of cpanel


    theres all kinds of things to do then just asume this and that..

    OCX
     
  3. Ganga

    Ganga Well-Known Member

    Joined:
    Oct 2, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    Thanks for the reply, we have done this, and our my.cnf is fine.

    Is there anything else, any log that I may paste here which may help to troubleshoot deeper?

    The problem is still occurring.

    Thank you.
     
    #3 Ganga, Sep 26, 2005
    Last edited: Sep 26, 2005
  4. easyhoster1

    easyhoster1 Well-Known Member

    Joined:
    Sep 25, 2003
    Messages:
    659
    Likes Received:
    0
    Trophy Points:
    16
    PHP version: 4.3.11

    Very insecure version of php...I would upgrade to 4.4.0 asap.
     
  5. Freezer

    Freezer Well-Known Member

    Joined:
    Jun 13, 2005
    Messages:
    120
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Den Haag
    How big is your database(s)?

    Maybe you need more memory for mysql.
     
  6. Ganga

    Ganga Well-Known Member

    Joined:
    Oct 2, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    The database is 260 Mb.

    Thanks for any further help, much appreciated.
     
  7. Zachery

    Zachery Member

    Joined:
    Apr 15, 2004
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    What is in your my.cnf as it stands now?
     
  8. Ganga

    Ganga Well-Known Member

    Joined:
    Oct 2, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    Here is what is contained:

    START

    [mysqld]
    set-variable = max_connections=500
    safe-show-database

    END

    Many thanks again.

    P.S: I hope I have made myself understood earlier, we have installed PHP 4.4.0 and we have rebuilt apache as well, the problem still persists.

    Thanks
     
  9. dave9000

    dave9000 Well-Known Member

    Joined:
    Apr 7, 2003
    Messages:
    891
    Likes Received:
    1
    Trophy Points:
    16
    Location:
    arkansas
    cPanel Access Level:
    Root Administrator
    ok your system is running a very old kernel with security issues and io wait bug issues. This alone will cause you a problem. latest kernel is 2.4.21-32.0.1

    your my.cnf has NOT be optimized, it is the basic config that cpanel installs.

    At 200 apache requests a second depending on what content is being served 1 gig ram is not enuf nor is a 1.7 celeron

    optimize your my.cnf, search the forums as this has been discussed many times over

    also upgrade your server software to current levels

    if you are still having issues post your top readout and we can see if server resources are a issue
     
  10. Zachery

    Zachery Member

    Joined:
    Apr 15, 2004
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Heres a good starter my.cnf that should work well in general

    Code:
    mysqld]  
    max_connections = 300
    key_buffer = 16M  
    myisam_sort_buffer_size = 64M  
    join_buffer_size = 1M  
    read_buffer_size = 1M  
    sort_buffer_size = 2M  
    table_cache = 1024  
    thread_cache_size = 64  
    wait_timeout = 180  
    connect_timeout = 10  
    max_allowed_packet = 16M  
    max_connect_errors = 10  
    query_cache_limit = 1M  
    query_cache_size = 16M  
    query_cache_type = 1  
    skip-innodb  
      
    [mysqld_safe]   
    open_files_limit = 8192  
      
    [mysqldump]  
    quick  
    max_allowed_packet = 16M  
      
    [myisamchk]   
    key_buffer = 64M   
    sort_buffer = 64M  
    read_buffer = 16M  
    write_buffer = 16M 
     
  11. Ganga

    Ganga Well-Known Member

    Joined:
    Oct 2, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    So many thanks to everybody!

    Things seem to be pretty much stable now, thanks.
     
Loading...
Similar Threads - Help please Apache
  1. deathy
    Replies:
    1
    Views:
    84
  2. DeepXP
    Replies:
    2
    Views:
    604
  3. saman1991
    Replies:
    1
    Views:
    628

Share This Page