Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Jul 2008
    Posts
    6

    Default high mysql load

    i noted several time that there is a process running in my WHM, which says :

    ----
    /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --log-error=/var/lib/mysql/ns1.myhost.com.err --pid-file=/var/lib/mysql/ns1.myhost.com.pid
    ----
    does anyone have any idea what is this ? some time when the site get too slow then i have to kill this process to start running the website smoothly.

    My query is :

    1. How can i disable it ?
    2. is it very required thing ?

  2. #2
    Member
    Join Date
    May 2006
    Posts
    271
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    I'm not a "guru" or an expert on this topic, so you should definitely get more input from the other users here, but as someone who has experienced what you're talking about these are my thoughts/opinions:

    First, I don't think you want to try to disable that at all. That is an error log of mySQL errors being written to it in real time and the information in the log can in some cases be essential to resolving database driven account issues.

    Second, a large number of those error process being reported (PID) can be caused by a number of things and it's going to be up to you (or your data center or a hired sysadmin) to truly distiguish the source, but here are a few things that can cause the constant stream and high load of those mysql error processes:

    - An account(s) on your server could be running a script that is very poorly configured or possibly running with a very corrupt database

    - You might have a server that is under-powered for handling the amount of database-driven sites/scripts that you're hosting on it (in which case the solution can sometimes be to add more RAM, and/or upgrade your hardware all-together)

    - Your my.cnf file (your mySQL config) might need to be optimized to handle the type of database-driven sites that you're hosting and to handle the sheer VOLUME of traffic and requests coming from a particular account (or number of accounts)

    In my case when I had that problem on a particular server, it turned out to be a combination of all of the above. mySQL needed to be optimized by an expert, I needed to upgrade to a more powerful server, and there were a couple of PHP scripts running under a customer account that were poorly coded with far outdated syntax and I had to address that with the customer directly (basically letting them know that their script was throwing constant errors due to bad coding and DB misconfiguration).

    So whatever you do, I'd say do not attempt to stop the reporting processes and definitely do not delete any files before you get more advice here and perhaps have a more experienced / expert sysadmin examine the server for you while these mySQL PID errors are overloading it.

    Good luck, and definitely get more opinions than just mine. Even after many years of running cPanel servers I'm still not comfortable doling out advice even when sometimes I might be right.

  3. #3
    Member
    Join Date
    Jul 2008
    Posts
    6

    Default

    Hi 'Metro2',

    Thanks for the detail reply, i understand the process you have replied. I am very much sure about the server conflagration.

    How can we find out which script is eating up the recourse ?

    Regards,
    Shashi Kant

  4. #4
    Member
    Join Date
    May 2010
    Posts
    321

    Default

    Almost everyone will have something like that above, Just basicly saying what the user of mysql is, where its saving logs and such. Its not a problem.

    Going of your post, If you go in my.cnf you will see the output in there, eg:

    user=mysql
    Remove that line then, The page where you got those stats, probable running processes, Then you will see

    user: mysql gone..

    Its just the settings based on your my.cnf

    This process, Well on me uses 0% CPU and 5MB memory on all servers. Noting to worry about.

    cPanel staff may explain things much better, They will reply, Just hang in there

  5. #5
    Member
    Join Date
    Oct 2008
    Posts
    38

    Default

    That is just the running MySQL process, including the options that were used to start it (such as log file location etc). If you disable that, you disable MySQL.

    What you need to do if it's using a lot of resources is a identify the queries cause the it. The command "mysqladmin pr" is good place to start, it shows current queries. You also should enabled slow-query logging in your my.cnf so you can review the slow query log for bad queries.

    Also, look at the daily process stats in your WHM, and look for the accounts using .4% MySQL resources or more daily. They are a good starting point to find problems.

    But that process you mentioned like I said is just the command that runs MySQL. If you are seeing MySQL using a lot of resources, it is not the actual process. It is the combination of the scripts and other program on the server using MySQL.
    Free hosting - Free cPanel hosting
    Using cPanel in the most extreme conditions!

Similar Threads & Tags
Similar threads

  1. High load (mysql)
    By iulian_2007 in forum Optimization
    Replies: 11
    Last Post: 05-23-2011, 05:36 AM
  2. High Load Mysql
    By techteen in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 11-09-2007, 07:59 AM
  3. MYSQL High Load Question
    By fulleffect in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 05-19-2007, 07:23 PM
  4. high load: mysql
    By Secret Agent in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 01-15-2006, 06:44 PM
  5. MySQL - High Load
    By Jasio in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 01-01-2005, 08:56 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube