Problem CPU 100% - mySQL logs
Hi,
I have a CPU usage on my server.
Here's the process that takes almost all the processors time :
/usr/sbin/mysql --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/...
How can I be helped with this issue ?
Thanks in advance !
Regards
Frank.
-
Hello, You can try running a command such as "mysqladmin processlist" to get a better idea of how which databases/tables are utilizing the most resources. Thank you. 0 -
Hi, Here's the result : Id | User | Host | db | Command | Time | State | Info | +---------+------------------+-----------+-------------------------------+---------+------+--------------+------------------------------------------------------------------------------------------------------+ | 4820431 | eximstats | localhost | eximstats | Sleep | 197 I have removed the other lines as I think it's the one. Regards Frank. 0 -
Check the size of the eximstats database with a command such as: du -sh /var/lib/mysql/eximstats You may want to reduce the following value in "WHM Home " Server Configuration " Tweak Settings", under the "Stats and Logs" tab, if the database is too large: "The interval, in days, to retain Exim stats in the database" You can also follow the instructions in the following thread if you want to empty the database: 0 -
Hi, Size is 1,9M. And my server is still at 100% of CPU usage. I don't know what to do as I don't understand where it comes from. This process : /usr/sbin/mysql --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/logfile is strange because file /var/lib/mysql/logfile remains empty. What happens ? Thanks for you help. Regards Frank. 0 -
That's a normal MySQL process. It does not indicate a problem with MySQL. You may need to review the following thread in-case it's not MySQL causing your server load: Troubleshooting High Loads On Linux Systems Thank you. 0 -
I will read this page But this process : /usr/sbin/mysql --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/logfile is always above 50% of CPU use. And the log error file "logfile" remains empty. Please confirm that's not the origin of my server's problem. Regards 0 -
I can't confirm that MySQL is not the cause of your server's CPU usage, but the listing of the MySQL error log in the process is normal. Thank you. 0 -
Hi, But why does the log file remain empty ? I've never seen this line on my server's CPU usage list that high for so long. Regards 0 -
Check /etc/my.cnf to see if you are using a custom log file for MySQL errors. If not, the default path to it should be: /var/lib/mysql/$hostname.err Restart MySQL and you should see data populated to the log. Thank you. 0 -
Yes I had changed the log file location : general_log_file = "/var/log/mysql/mysql.log" I have just restarted mysql, but I keep on having this task running : /usr/sbin/mysql --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/logfile And file /var/lib/mysql/mysql.log remains empty. Any idea ? Thanks by the way for your patient help. Regards Frank. 0 -
The process itself is normal, but feel free to open a support ticket using the link in my signature so we can investigate why the log file is not populated. You can post the ticket number here so we can update this thread with the outcome. Thank you. 0 -
To update, our analysts found that permissions on /var/log/mysql were invalid. Updating the permissions to 0755 on this directory allowed for successful MySQL error logging. Thank you. 0
Please sign in to leave a comment.
Comments
14 comments