Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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.

EDIT

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
share|improve this question
    
Please show your my.cnf and how much RAM you have –  RolandoMySQLDBA Apr 19 '12 at 5:02
    
Did your production machine have a MySQL crash or server crash recently ??? –  RolandoMySQLDBA Apr 19 '12 at 5:08
    
Please run this query and tell me the result : SHOW VARIABLES LIKE 'max_allowed_packet'; –  RolandoMySQLDBA Apr 19 '12 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. –  Abdul Manaf Apr 19 '12 at 5:13
    
mysql> SHOW VARIABLES LIKE 'max_allowed_packet'; Result is 16777216 –  Abdul Manaf Apr 19 '12 at 5:15

2 Answers 2

up vote 1 down vote accepted

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_allowded_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

[mysqld]
max_allowed_packet=1G
innodb_log_file_size=2047M

STEP 02) service mysql stop

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

STEP 04) service mysql start

share|improve this answer

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.

share|improve this answer
    
An incorrect setting is an issue with the server, I think :) –  dezso Dec 4 '12 at 10:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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