mysqldump: Got errno 32 on write: 'all of a sudden' plenty of room still…Drupal 6 installation

白昼怎懂夜的黑 提交于 2019-12-04 01:46:21
RolandoMySQLDBA

Seems strange

[root@*****]# perror 28
OS error code  28:  No space left on device
[root@*****]# perror 32
OS error code  32:  Broken pipe

Since the mysqldump keeps breaking at random places, it is space-related, and no disk full condition, I would suspect the problem at a deeper layer : the MySQL Packet. What is a MySQL Packet?

According to the page 99 of the Book

here are paragraphs 1-3 explaining it:

MySQL network communication code was written under the assumption that queries are always reasonably short, and therefore can be sent to and processed by the server in one chunk, which is called a packet in MySQL terminology. The server allocates the memory for a temporary buffer to store the packet, and it requests enough to fit it entirely. This architecture requires a precaution to avoid having the server run out of memory---a cap on the size of the packet, which this option accomplishes.

The code of interest in relation to this option is found in sql/net_serv.cc. Take a look at my_net_read(), then follow the call to my_real_read() and pay particular attention to net_realloc().

This variable also limits the length of a result of many string functons. See sql/field.cc and sql/intem_strfunc.cc for details.

Given this explanation, making bulk INSERTs will load/unload a MySQL Packet rather quickly. This is especially true when max_allowed_packet is too small for the given load of data coming at it.

I wrote about this before : MySQL server has gone away obstructing import of large dumps

Try raising max_allowed_packet for the mysqldump to 1G as follows:

mysqldump --max-allowed-packet=1073741824 ...

and try the mysqldump.

If this does not do it, then do this:

Added this to my.cnf

[mysqld]
max_allowed_packet = 1G

Then, login to MySQL as root@localhost and run this

mysql> SET GLOBAL max_allowed_packet = 1024 * 1024 * 1024;

and try the mysqldump.

Give it a Try !!!

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!