Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Broken Pipe/MySQL Server has gone away

MySQL throwing Broken Pipe and MySQL Server has gone away errors. My database table contains text fields where I insert large HTML in every 1 hour periodically.

Which MySQL variable should i consider to set.

Here is current configuration:

[mysqld]
datadir=/home/monk/mysql
socket=/home/monk/mysql/mysql.sock
user=mysql
default_time_zone='+06:00'
innodb_buffer_pool_size=35G
innodb_buffer_pool_instances=15
query_cache_type=ON
query_cache_size=64M
join_buffer_size=524288
tmp_table_size=32M
max_heap_table_size=32M  


# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
max_allowed_packet=1G
# Recommended in standard MySQL setup
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

wait_timeout = 2000
interactive_timeout = 2000



#bind-address=127.0.0.1
##skip-networking~   
like image 952
Abhishek Ginani Avatar asked Sep 25 '22 19:09

Abhishek Ginani


1 Answers

I think, max_allowed_packet should be 256MB is enough and you may have a slow network connection. try the below variables also.

set net_write_timeout to double and increase net_buffer_length also in a rally.

Also How much ram you have in your box, are you taking all to innodb_buffer_pool, set this upto 70 to 80% of your box ram.

One more advice is to turn off query cache as it is a web stuff.

like image 115
Adarsh Gangadharan Avatar answered Oct 18 '22 07:10

Adarsh Gangadharan