Could not download and create transport package with signature

This message pops up when I try to download a package(any package):
image

I also get this string of errors in the error log:

[2021-03-03 14:02:52] (ERROR @ /this/is/a path/core/xpdo/om/xpdoobject.class.php 
: 1448) PHP warning: Error while sending QUERY packet. PID=3838217
[2021-03-03 14:02:52] (ERROR @ /this/is/a path/core/xpdo/om/xpdoobject.class.php 
: 1452) Error HY000 executing statement:
INSERT INTO `modxel_transport_packages` (`signature`, `created`, `state`, `workspace`, `provider`, 
`disabled`, `source`, `package_name`, `metadata`, `version_major`, `version_minor`, 
`version_patch`, `release`, `release_index`) VALUES (...)
Array
(
    [0] => HY000
    [1] => 2006
    [2] => MySQL server has gone away
)

[2021-03-03 14:02:52] (ERROR @ /this/is/a path/core/xpdo/om/xpdoobject.class.php 
: 240) Error HY000 executing statement: 
Array
(
    [0] => HY000
    [1] => 2006
    [2] => MySQL server has gone away
)

[2021-03-03 14:02:52] (ERROR @ 
/this/is/a path/core/xpdo/om/xpdoobject.class.php : 1452) Error HY000 executing 
statement:
INSERT INTO `modxel_session` (`id`, `access`, `data`) VALUES (...)
Array
(
    [0] => HY000
    [1] => 2006
    [2] => MySQL server has gone away
)

I have contacted the hosting company as well as read other available articles to no avail. The hosting company doesn’t get any errors on SQL or PHP. In the other Articles and forum posts, the solutions don’t work.

MODx Version: 2.8.1
Server: MariaDB
Server Version: 10.1.33-MariaDB - MariaDB Server

Thanks in advance.

That’s saying the database connection isn’t available. I’m assuming you’re not having issues with the site itself, front-end works fine?

If so, my guess would be the database has a very short wait_timeout configured. In the time it takes for the download to process, the database server disconnects MODX because it’s not sending any queries. That’s something you can tweak in the database configuration, but you’ll likely need to ask the host for that if you’re on a shared server.

1 Like

Yep, that did it. Thank you @markh, but what would make it time out like that, since it was originally set to the server default which works fine on the multiple other MODx sites on that server?

Not sure. Apparently there were some issues on the modx.com end as well today (downloads didn’t work for a little bit) so maybe those things coincided.

I do know that I’ve ran into this often enough during the installation of Commerce, my biggest package, that it now has a resolver to reconnect to the database if it notices the connection was dropped. :d

1 Like

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.