How to fix this problem for Mysql!

.::Gsmdenis::.

Verified User
Joined
Jun 15, 2007
Messages
123
Mysql always take the CPU 100%

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3288 mysql 25 0 615m 148m 2704 R 100 3.7 3:45.74 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pi
4234 apache 16 0 550m 38m 23m R 11 0.9 0:02.98 /usr/sbin/httpd -k start -DSSL
4097 apache 15 0 544m 34m 22m R 5 0.9 0:04.48 /usr/sbin/httpd -k start -DSSL
3861 root 15 0 2300 1068 788 R 1 0.0 0:02.02 top -ci
4222 apache 16 0 545m 38m 25m R 1 0.9 0:03.13 /usr/sbin/httpd -k start -DSSL
3408 mysql 16 0 615m 148m 2704 R 0 3.7 0:04.37 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pi
17034 dovecot 15 0 4780 1748 1452 R 0 0.0 0:00.00 pop3-login
20015 root 15 0 6456 1892 1544 R 0 0.0 0:02.09 sshd: root@pts/0
29881 apache 15 0 597m 88m 23m R 0 2.2 0:03.78 /usr/sbin/httpd -k start -DSSL

here is the my.cnf
[mysqld]
local-infile=0
skip-locking
skip-innodb
query_cache_limit=2M
query_cache_size=64M
query_cache_type=1
max_connections=1000
interactive_timeout=60
wait_timeout=20
connect_timeout=30
thread_cache_size=128
key_buffer=512M
join_buffer=8M
max_allowed_packet=150M
table_cache=2048
record_buffer=16M
sort_buffer_size=8M
read_buffer_size=4M
max_connect_errors=10
# Try number of CPU's*2 for thread_concurrency
thread_concurrency=8
myisam_sort_buffer_size=128M
server-id=1
tmp_table_size=256M

[safe_mysqld]
err-log=/var/log/mysqld.log
open_files_limit=8192
#log-slow-queries=/var/log/mysql-slow.log
#long_query_time=10

[mysqldump]
quick
max_allowed_packet=150M

[mysql]
no-auto-rehash
#safe-updates

[isamchk]
key_buffer=512M
sort_buffer=512M
read_buffer=16M
write_buffer=16M

[myisamchk]
key_buffer=512M
sort_buffer=512M

Pls any friend , give some suggest !

BR.,

Denis
 
Thankz

I had lot of them in
what i dit....

cd /var/lib/mysql


mysql -u da_admin -p
*****

mysql> PURGE MASTER LOGS TO 'mysql-bin.000222'


mysql>\q

myisamchk -s h*/*.MYI (-s is for check and h* had to put something before * to get it work the a,b,c....)
myisamchk -r h*/*.MYI (-r for repare)
myisamchk -o h*/*.MYI (-o for optimize.... i think)...
 
Back
Top