PDA

View Full Version : mysql gets stuck


rldev
07-12-2006, 10:11 PM
Ocassionally my mysql is getting stuck. The system think it is running, but users get mysql.sock errors. Since the system thinks it is running, I get no warning. A simple restart does the trick. How can I diagnose this problem? This server has very little activity.

Linu
07-24-2006, 05:52 AM
Originally posted by rldev
Ocassionally my mysql is getting stuck. The system think it is running, but users get mysql.sock errors. Since the system thinks it is running, I get no warning. A simple restart does the trick. How can I diagnose this problem? This server has very little activity.


compile php from the source "./configure' '--with-apxs2=/usr/local/apache/bin/apxs' '--enable-mbstring'" with mbstring support
this will reduce your mysql.sock errors.
If you would like to do a mysql optimzation please edit /etc/my.cnf
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-locking
set-variable = max_connections=2000
set-variable = max_user_connections=2000
table_cache = 800
key_buffer = 16M
max_allowed_packet = 1M
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M

Regards
Linu Lawrence

existenz
07-29-2006, 06:49 PM
When this happens you can look at this:

netstat -nt | greo 3306 | wc

Then hop into mysqladmin

mysqladmin -u root -p

Then do a processlist and let us know what it prints out. You do need to get you my.cnf but it sound like you may have the wait timeout to high (which it is by default).