Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 356
  • Last Modified:

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
0
CEHJ
Asked:
CEHJ
  • 2
  • 2
1 Solution
 
karl-henrikCommented:
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.
0
 
CEHJAuthor Commented:
>>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
0
 
karl-henrikCommented:
Alright then you should not have much of a problem if not the timeouts are very short? This is a quite good guide to fault search this problem.. it's a hassle to find but it have helped me in the past

http://dev.mysql.com/doc/refman/5.0/en/gone-away.html

0
 
CEHJAuthor Commented:
Thanks
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now