Link to home
Start Free TrialLog in
Avatar of CEHJ
CEHJFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Connection 'going away' problems

ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    4688
Current database: foo_bar

is the constant complaint of this db. I mean the query succeeds but that phenomenon is at least irritating. How to stop it?

Perhaps it's something to do with the settings? Please see attached file.
vars.txt
Avatar of karl-henrik
karl-henrik
Flag of Sweden image

This problem is often because you have to small resources to run the Mysql server
But this is a sample configuration that might help

[mysqld]

port       = 3306
socket       = /tmp/mysql.sock
skip-locking
key_buffer = 384M
max_allowed_packet = 64M
table_cache = 4096
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 64M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 32M

This can also be a problem that you are running a to old version of Mysql with a 3:d party application (like drupal perhaps?) that require a more modern version of Mysql then you are running

Hope it helps
//Karl.
Avatar of CEHJ

ASKER

>>This problem is often because you have to small resources to run the Mysql server

I have around 3GB ram, plenty of disk space and the dbs total about 225MB in size.  The version is  5.0.92-community
ASKER CERTIFIED SOLUTION
Avatar of karl-henrik
karl-henrik
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CEHJ

ASKER

Thanks