5

I should be ashamed of myself, for asking, I know.

Check out this screenshot attached. enter image description here

My server, which is indeed not seeing HUGE amounts of traffic, should not be this overloaded. Mysql is having a party and everyones invited. The thing is I don't like these kinds of wild parties.

How do I kill this stuff? How do I regulated it so that it doesn't keep happening? Pretty soon my host is going to call the police and the party will be over for everyone.

  • 1
    I thought everyone likes parties ;) – ypercubeᵀᴹ May 3 '15 at 0:26
  • Yeah, but this is one of those hard-rocking memory intensive parties that make page-load slow. Plus I wasn't invited - I only discovered it by happenstance which means no matter how good it is I don't like it. – 1Up May 3 '15 at 0:34
  • In addition to what Rolando has said, it is impossible to start two instances on the same port with MySQL. I frequently mess around with my own compiled from source instances and forget to reset the port in my.cnf - any attempt to start the new server on an in-service port just fails. So, unless you've configured about ~ 30 my.cnf s with 30 different port numbers, it's not possible that you are really have that many instances running. – Vérace May 3 '15 at 13:05
  • @1Up Do not worry, MySQL seems to be using only 20% of the available memory, and you seem to have 50% of freeable memory, so I do not see nothing to worry right now. – jynus May 3 '15 at 14:58
4

Don't be fooled by what you see.

mysqld will not multiple instances on the same datadir and ibdata1. How do I know this?

On Sep 26, 2014 I answered MySQL got signal 11 error and slave is down. In my answer, I mentioned how InnoDB Architecture only allows one mysqld process to open a Master Thread to ibdata1.

Therefore, if you do not see the following lines in your error log

6 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2014-09-26 12:51:53 14166 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
2014-09-26 12:51:53 14166 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.

In light of these things, I assure you, you do not have multiple mysqld processes.

What, then, are you seeing? Those are actual DB Connections emanating from the mysqld instance. I have seen this freakish display come from source-compiled versions of mysqld. I have mentioned it in passing in my old post innodb_buffer_pool_size not changed and Identical mysql processes (ServerFault). My suspicion is that the OS is manifesting DB Connections as if they were mysqld processes. On the contrary, they are just ordinary DB Connections.

You should run this in Linux

ps -ef | grep mysqld | grep -v grep | wc -l

You should get an output of 2 (1 for mysqld and 1 for mysqld_safe)

If you get just 1, you probably got a very old version of MySQL.

  • 3
    pgrep mysqld is your friend. @1Up It is also very easy to see if you change to "Tree mode" (F5): i.imgur.com/YeDtYP2.png MySQL will generate ~20 internal threads (not processes) even if there are no connections. – jynus May 3 '15 at 14:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.