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.

Hundreds of MySQL processes!

Discussion in 'General Discussion' started by Blue|Fusion, Jan 22, 2005.

  1. Blue|Fusion

    Blue|Fusion Well-Known Member

    Joined:
    Sep 12, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Cleveland, Ohio
    Hello,

    I have had a problem on one of my servers where tons of MySQL processes start spawning out of what seems to be nowhere. I am pretty sure, however, that there is some script causing this. Recently, the server has been unplugged from the internet and when it did come back online, MySQL was normal, with an uptime of 33 days. It has been running 1 day now and there are near 200 mysqld processes in ps -aux.

    When I try to stop the service, it waits for a while to stop, then it gives up on exiting nicely and forcably kills it. Even then, there are a whole bunch of mysqld processes but killall mysqld gets rid of them.

    Within a few minutes of starting mysql again, the processes start spawning like crazy. When the processes do get very high, I get the error "Too Many Connections" in cPanel's servup.

    I am very open to ideas now, any tips?

    OS: Fedora Core 1
    cPanel 10.0.0-CURRENT-6
    MySQL 4.1

    By the way, this has been happening for over a month and also with MySQL 4.0.22 and 4.0.23.
     
  2. Ramsy

    Ramsy Guest

    Hmm, i think redhat just displays all connections ...
    i had cpanel running on freebsd and it just showed only the mysql process
    i noticed it as well but didnt pay too much attention to it.
    if you get too much connections error you should adjust your my.cnf and raise it

    take a look at this http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/rrdworld/mysqlard.html
     
  3. Blue|Fusion

    Blue|Fusion Well-Known Member

    Joined:
    Sep 12, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Cleveland, Ohio
    I set max connections to 500 on all of my servers, except about a month ago when this started giving me problems, I pushed it up to 1000 connections, even 2000, and still it maxes out. When I try to load the connections data in WHM, it shows 1 eximstats sleeping and the root user getting the connection table.
     
  4. netlook

    netlook Well-Known Member
    PartnerNOC

    Joined:
    Mar 25, 2004
    Messages:
    335
    Likes Received:
    0
    Trophy Points:
    16
    Try uncomment log-bin option in /etc/my.cnf like:

    #log-bin

    This should help.
     
  5. elleryjh

    elleryjh Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    479
    Likes Received:
    0
    Trophy Points:
    16
    I believe I am having the same problem. Did you get this fixed? Any new ideas?
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,451
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Do you know what the username is on the database that's showing up? Can you check the htaccess in that account to see whats in it?

    I had a similar problem recently and removing what the user put into the htaccess file stopped this problem for us. He had used the hotlink feature in cPanel.
    I haven't tried to reproduce the problem though.

    Not sure if this is any help at all but can't hurt to mention it.
     
  7. WestBend

    WestBend Well-Known Member

    Joined:
    Oct 12, 2003
    Messages:
    173
    Likes Received:
    0
    Trophy Points:
    16
    mysqld is a multi-threaded daemon. The Hundreds of processes are really just on process. So 150MB RSS is the total for all threads being opened. Your seeing lots and lots of threads which is ok however it sounds like your my.cnf needs to be altered. Check the sample my.cnfs that come with mysql. heavy.cnf etc and tweak as necessary.

    http://www.trafficg.com/mysql/

    Mytoolkit - MySql and Server Helper Scripts

    Awesome set of scripts that will show you things like tmp_table usages. Make sure you have enough set in the caches and reserve space so it is not having serious IOWAIT times.
     
Loading...

Share This Page