MySQL "server has gone away" when reloading database dump due to "max_allowed_packet" default

  • Done
  • quality assurance status badge
Details
3 participants
  • Ben Sturmfels
  • Ludovic Courtès
  • zimoun
Owner
unassigned
Submitted by
Ben Sturmfels
Severity
normal
B
B
Ben Sturmfels wrote on 11 Jan 2017 01:10
(address . bug-guix@gnu.org)
20170111111003.5e8ae2c8@stumbles.id.au
Hi there!

I'm using GuixSD 0.12.0 and ran `guix package --install=mysql` (which
I gather gave me MariaDB 10.1.19), then created a database and tried to
reload a database dump of a decent sized existing database:

zcat dump.sql.gz | mysql DBNAME

which failed with:

ERROR 2006 (HY000) at line 2266: MySQL server has gone away

Reloading the same dump works for me on default MySQL in Trisquel 7.
The database dump was created on Debian with `mysqldump --no-create-db
DBNAME`.

On Guix, I was able to reload the dump by running mysqld with a custom
config file with max_allowed_packet=16M under [mysqld].

It appears that the default value for `max_allowed_packet` under
Debian/Trisquel is "16M", where under Guix it is "4M". The mysqldump
defaults bunche a whole lot of records into a single insert statement
for performance, which is why I'm getting a value > 4M.

Could it be worth setting max_allowed_packet to 16M in Guix's
`mysql-configuration-file` function for consistency with Debian?

Regards,
Ben
L
L
Ludovic Courtès wrote on 12 Jan 2017 15:22
(name . Ben Sturmfels)(address . ben@stumbles.id.au)(address . 25415@debbugs.gnu.org)
87wpe02w9c.fsf@gnu.org
Hi Ben,

Ben Sturmfels <ben@stumbles.id.au> skribis:

Toggle quote (15 lines)
> Reloading the same dump works for me on default MySQL in Trisquel 7.
> The database dump was created on Debian with `mysqldump --no-create-db
> DBNAME`.
>
> On Guix, I was able to reload the dump by running mysqld with a custom
> config file with max_allowed_packet=16M under [mysqld].
>
> It appears that the default value for `max_allowed_packet` under
> Debian/Trisquel is "16M", where under Guix it is "4M". The mysqldump
> defaults bunche a whole lot of records into a single insert statement
> for performance, which is why I'm getting a value > 4M.
>
> Could it be worth setting max_allowed_packet to 16M in Guix's
> `mysql-configuration-file` function for consistency with Debian?

Definitely. I would add a ‘max-allowed-packet’ field in
<mysql-configuration> in (gnu services databases) and make sure it’s
honored.

Would you like to give it a try?

Thanks for your report!

Ludo’.
B
B
Ben Sturmfels wrote on 13 Jan 2017 00:29
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 25415@debbugs.gnu.org)
58781150.3060202@stumbles.id.au
On 13/01/17 01:22, Ludovic Courtès wrote:

Toggle quote (9 lines)
>> Could it be worth setting max_allowed_packet to 16M in Guix's
>> `mysql-configuration-file` function for consistency with Debian?
>
> Definitely. I would add a ‘max-allowed-packet’ field in
> <mysql-configuration> in (gnu services databases) and make sure it’s
> honored.
>
> Would you like to give it a try?

Sure, I'll give it a shot!

It looks as though the MariaDB source comes with a settings file for
Debian that includes max-allowed-packet=16M:

mariadb-XX.XX.XX/debian/additions/my.cnf

Would you recommend adding just max-allowed-packet, or would it be worth
applying all these settings in this file?

Ben
Attachment: signature.asc
L
L
Ludovic Courtès wrote on 13 Jan 2017 09:03
(name . Ben Sturmfels)(address . ben@stumbles.id.au)(address . 25415@debbugs.gnu.org)
87shonl736.fsf@gnu.org
Ben Sturmfels <ben@stumbles.id.au> skribis:

Toggle quote (21 lines)
> On 13/01/17 01:22, Ludovic Courtès wrote:
>
>>> Could it be worth setting max_allowed_packet to 16M in Guix's
>>> `mysql-configuration-file` function for consistency with Debian?
>>
>> Definitely. I would add a ‘max-allowed-packet’ field in
>> <mysql-configuration> in (gnu services databases) and make sure it’s
>> honored.
>>
>> Would you like to give it a try?
>
> Sure, I'll give it a shot!
>
> It looks as though the MariaDB source comes with a settings file for
> Debian that includes max-allowed-packet=16M:
>
> mariadb-XX.XX.XX/debian/additions/my.cnf
>
> Would you recommend adding just max-allowed-packet, or would it be worth
> applying all these settings in this file?

I’m not famliar with MySQL/MariaDB, but any setting that sounds useful
to you is welcome.

Thanks,
Ludo’.
Z
Z
zimoun wrote on 14 Sep 2021 13:51
(name . Ben Sturmfels)(address . ben@stumbles.id.au)
86pmtbtlxl.fsf@gmail.com
Hi,

Sorry for the delay about this old bug#25415 [1].


On Fri, 13 Jan 2017 at 10:29, Ben Sturmfels <ben@stumbles.id.au> wrote:
Toggle quote (21 lines)
> On 13/01/17 01:22, Ludovic Courtès wrote:
>
>>> Could it be worth setting max_allowed_packet to 16M in Guix's
>>> `mysql-configuration-file` function for consistency with Debian?
>>
>> Definitely. I would add a ‘max-allowed-packet’ field in
>> <mysql-configuration> in (gnu services databases) and make sure it’s
>> honored.
>>
>> Would you like to give it a try?
>
> Sure, I'll give it a shot!
>
> It looks as though the MariaDB source comes with a settings file for
> Debian that includes max-allowed-packet=16M:
>
> mariadb-XX.XX.XX/debian/additions/my.cnf
>
> Would you recommend adding just max-allowed-packet, or would it be worth
> applying all these settings in this file?

Well, anything that suits you. :-) Could you send a patch if it is
relevant?

All the best,
simon
Z
Z
zimoun wrote on 12 Oct 2021 23:42
(name . Ben Sturmfels)(address . ben@stumbles.id.au)
86sfx5kjhp.fsf@gmail.com
Hi Ben,

On Tue, 14 Sep 2021 at 13:51, zimoun <zimon.toutoune@gmail.com> wrote:
Toggle quote (25 lines)
> On Fri, 13 Jan 2017 at 10:29, Ben Sturmfels <ben@stumbles.id.au> wrote:
>> On 13/01/17 01:22, Ludovic Courtès wrote:
>>
>>>> Could it be worth setting max_allowed_packet to 16M in Guix's
>>>> `mysql-configuration-file` function for consistency with Debian?
>>>
>>> Definitely. I would add a ‘max-allowed-packet’ field in
>>> <mysql-configuration> in (gnu services databases) and make sure it’s
>>> honored.
>>>
>>> Would you like to give it a try?
>>
>> Sure, I'll give it a shot!
>>
>> It looks as though the MariaDB source comes with a settings file for
>> Debian that includes max-allowed-packet=16M:
>>
>> mariadb-XX.XX.XX/debian/additions/my.cnf
>>
>> Would you recommend adding just max-allowed-packet, or would it be worth
>> applying all these settings in this file?
>
> Well, anything that suits you. :-) Could you send a patch if it is
> relevant?

Would you like to give a try to fix bug#25415 [1]? :-)


Cheers,
simon
Z
Z
zimoun wrote on 26 Nov 2021 02:51
(name . Ben Sturmfels)(address . ben@stumbles.id.au)
86czmnr8ej.fsf@gmail.com
Hi Ben,

I hope you are well.


On Tue, 12 Oct 2021 at 23:42, zimoun <zimon.toutoune@gmail.com> wrote:
Toggle quote (23 lines)
> On Tue, 14 Sep 2021 at 13:51, zimoun <zimon.toutoune@gmail.com> wrote:
>> On Fri, 13 Jan 2017 at 10:29, Ben Sturmfels <ben@stumbles.id.au> wrote:
>>> On 13/01/17 01:22, Ludovic Courtès wrote:
>>>
>>>>> Could it be worth setting max_allowed_packet to 16M in Guix's
>>>>> `mysql-configuration-file` function for consistency with Debian?
>>>>
>>>> Definitely. I would add a ‘max-allowed-packet’ field in
>>>> <mysql-configuration> in (gnu services databases) and make sure it’s
>>>> honored.
>>>>
>>>> Would you like to give it a try?
>>>
>>> Sure, I'll give it a shot!
>>>
>>> It looks as though the MariaDB source comes with a settings file for
>>> Debian that includes max-allowed-packet=16M:
>>>
>>> mariadb-XX.XX.XX/debian/additions/my.cnf
>>>
>>> Would you recommend adding just max-allowed-packet, or would it be worth
>>> applying all these settings in this file?

The bug#25415 [1] is about MySQL and a patch seems required.

Would you like give a try?



Cheers,
simon
Z
Z
zimoun wrote on 5 Jan 2022 00:00
(name . Ben Sturmfels)(address . ben@stumbles.id.au)
86wnjfayys.fsf@gmail.com
Hi,

On Fri, 26 Nov 2021 at 02:51, zimoun <zimon.toutoune@gmail.com> wrote:
Toggle quote (30 lines)
> On Tue, 12 Oct 2021 at 23:42, zimoun <zimon.toutoune@gmail.com> wrote:
>> On Tue, 14 Sep 2021 at 13:51, zimoun <zimon.toutoune@gmail.com> wrote:
>>> On Fri, 13 Jan 2017 at 10:29, Ben Sturmfels <ben@stumbles.id.au> wrote:
>>>> On 13/01/17 01:22, Ludovic Courtès wrote:
>>>>
>>>>>> Could it be worth setting max_allowed_packet to 16M in Guix's
>>>>>> `mysql-configuration-file` function for consistency with Debian?
>>>>>
>>>>> Definitely. I would add a ‘max-allowed-packet’ field in
>>>>> <mysql-configuration> in (gnu services databases) and make sure it’s
>>>>> honored.
>>>>>
>>>>> Would you like to give it a try?
>>>>
>>>> Sure, I'll give it a shot!
>>>>
>>>> It looks as though the MariaDB source comes with a settings file for
>>>> Debian that includes max-allowed-packet=16M:
>>>>
>>>> mariadb-XX.XX.XX/debian/additions/my.cnf
>>>>
>>>> Would you recommend adding just max-allowed-packet, or would it be worth
>>>> applying all these settings in this file?
>
> The bug#25415 [1] is about MySQL and a patch seems required.
>
> Would you like give a try?
>
> 1: <http://issues.guix.gnu.org/issue/25415>

The bug is open since 2017 without any inputs despite my 3 questions.
Therefore, I will close it in one month from now if there is no more
interest in. The backlog is already enough long. :-)

Cheers,
simon
Z
Z
zimoun wrote on 23 Jun 2022 11:54
(address . 25415-done@debbugs.gnu.org)
86wnd77lj1.fsf@gmail.com
On Wed, 05 Jan 2022 at 00:00, zimoun <zimon.toutoune@gmail.com> wrote:
Toggle quote (10 lines)
> On Fri, 26 Nov 2021 at 02:51, zimoun <zimon.toutoune@gmail.com> wrote:
>> On Tue, 12 Oct 2021 at 23:42, zimoun <zimon.toutoune@gmail.com> wrote:
>>> On Tue, 14 Sep 2021 at 13:51, zimoun <zimon.toutoune@gmail.com> wrote:
>>>> On Fri, 13 Jan 2017 at 10:29, Ben Sturmfels <ben@stumbles.id.au> wrote:
>>>>> On 13/01/17 01:22, Ludovic Courtès wrote:

> The bug is open since 2017 without any inputs despite my 3 questions.
> Therefore, I will close it in one month from now if there is no more
> interest in. The backlog is already enough long. :-)

Done.


Cheers,
simon
Closed
?