warewulf / warewulf3

Warewulf is a scalable systems management suite originally developed to manage large high-performance Linux clusters.
107 stars 45 forks source link

"Got packet bigger than 'max_allowed_packet' bytes" w/MariaDB 5.5 & max_allowed_packet=32M #91

Open novosirj opened 7 years ago

novosirj commented 7 years ago

Using MariaDB 5.5.50 and WW 3.7.0 r1993.

Increased my MariaDB max_allowed_packet setting to 32M to try to increase wwvnfs image import performance. This works fine set to 16M out of the box, but setting it to 32M resulted in the following (debugging enabled to show the problem):

[Warewulf::DataStore::SQL::MySQL->chunk_size()/157]: max_allowed_packet: 33554432 [Warewulf::DataStore::SQL::MySQL->chunk_size()/158]: Returning max_allowed_packet - 786432 [Warewulf::Vnfs->vnfs_import()/161]: Chunked 32768000 bytes of /root/centos-7-cuda-novosirj20171103.vnfs DBD::mysql::st execute failed: Got a packet bigger than 'max_allowed_packet' bytes at /usr/share/perl5/vendor_perl/Warewulf/DataStore/SQL/MySQL.pm line 551. ERROR in Warewulf::DataStore::SQL::MySQL->put_chunk()/552: put_chunk() failed with error: Got a packet bigger than 'max_allowed_packet' bytes

This appears to be related to line 159 of MySQL.pm:

return ($max_allowed_packet - 786432);

Increasing this value to 1048576 solved the problem. It appears as if this value either needs to be calculated more accurately or raised to provide an additional margin.

novosirj commented 6 years ago

It looks like things have changed significantly here since 3.7?