I am getting an Issue after everey 2-3 minutes

mysql> show tables;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    57

I am really not able to find why it is happening. I saw to my error log it says

120419  0:36:03  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Last MySQL binlog file position 0 93884, file name /EBSmnt/mysql/mysql-bin.000233
120419  0:36:04  InnoDB: Started; log sequence number 1692 2597076235
120419  0:36:04 [Note] Event Scheduler: Loaded 0 events
120419  0:36:04 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.43-enterprise-gpl-advanced-log'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Enterprise Server - Advanced Edition (G

Can Anybody please tell How to handle the Scenario.It is on one of the Production Server.


RAM is of 7GB.

And InnoDB Configuration in my.cnf are

innodb_additional_mem_pool_size = 16M
innodb_buffer_pool_size = 3G
innodb_data_home_dir = /lvm/mysql
innodb_data_file_path = ibdata1:80G:autoextend
innodb_log_buffer_size = 8M
innodb_log_file_size = 1300M
innodb_log_files_in_group = 3
  • Please show your my.cnf and how much RAM you have Apr 19, 2012 at 5:02
  • Did your production machine have a MySQL crash or server crash recently ??? Apr 19, 2012 at 5:08
  • Please run this query and tell me the result : SHOW VARIABLES LIKE 'max_allowed_packet'; Apr 19, 2012 at 5:13
  • @RolandoMySQLDBA : I have updated the things in question.Actually we are starting the work on it from today so i don't know what happens to it in previous days.Our Client Reported that we are facing such issue.When i saw i was not also able to understand what is going on there. Apr 19, 2012 at 5:13
  • mysql> SHOW VARIABLES LIKE 'max_allowed_packet'; Result is 16777216 Apr 19, 2012 at 5:15

2 Answers 2


I suspect your max_allowed_packet and the presence of a large TEXT/BLOB field.

I answered two questions in the past that involved mysql crashing because of the max_allowed_packet being too small.

I recommend raising your max_allowed_packet to the max value, which is 1GB

If you have TEXT/BLOB fields, you may have entered a TEXT/BLOB field that is too big to pass through a MySQL Packet or through the InnoDB Log Files. You may need to resize your innodb log files to the max value, which is 2047M. Here is what to do:

STEP 01) Add this to /etc/my.cnf


NOTE: In Google Cloud, you can't enter 1G, you must use the value 1073741824

STEP 02) service mysql stop

STEP 03) rm -f /var/lib/mysql/ib_logfile[01]

STEP 04) service mysql start


From the MySQL error log shown in the question you don't have any issues with the MySQL server.

Error message on MySQL client prompt:

ERROR 2006 (HY000): MySQL server has gone away

...is because of two connection timeout variables namely wait_timeout, interactive_timeout.

If your connection is idle for more than interactive_timeout seconds your connection will get disconnected automatically.

  • An incorrect setting is an issue with the server, I think :)
    – dezso
    Dec 4, 2012 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.