Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Remove following line from /etc/my.cnf : mysql_slow_log_parser=/var/log/mysql-slow.log
Either download the script from given links or simply copy/paste complete script to a text file and save it to mysql_slow_log_parser.
mysql_slow_log_parser is used to parse output of your /var/log/mysql-slow.log [ Or say file specified by log-slow-queries directive. ]
Run it from command prompt by : mysql_slow_log_parser /var/log/mysql-slow.log
Your query time should not be higher. If the query time is higher try to optimize query by :
1. Deleting old records after taking proper backup to reduce table size.
2. Indexing.
File /var/log/mysql-slow.log should look something like :
Code:
use <dbname>;
UPDATE <tablename> SET time_average='433' WHERE page='332';
# Time: 061120 13:12:21
# User@Host: <user>[<user>] @ localhost []
# Query_time: 3 Lock_time: 0 Rows_sent: 0 Rows_examined: 0
I have;
P 6600 Core2Duo FS
4096 MB DDR2
2x250 GB SATAII
Plesk 8.2.1 Linux
Centos 5.0
system full up to date
And i have 10 websites, (AVARAGE today unique visitors: 25.000-35.000 and 2.000.000 - 3.000.000 hits)
APF, Plesk firewall, mod_evasive...
Hi,
I used to get a similiar sort of problem a month back, the same mysql error. My CPU Usage was constantly showing 99.9%. I did a lot of changing in my.cnf parameters but nothing worked. Finally the problem find out was on the developer side. They did a mistake in their coding. After correction, application is working just fine till today.
I have;
P 6600 Core2Duo FS
4096 MB DDR2
2x250 GB SATAII
Plesk 8.2.1 Linux
Centos 5.0
system full up to date
And i have 10 websites, (AVARAGE today unique visitors: 25.000-35.000 and 2.000.000 - 3.000.000 hits)
APF, Plesk firewall, mod_evasive...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.