Error "MySQL server has gone away" during update to 1.4

Hi,

When I try to upgrade Commerce 1.3.1 to last 1.4.0-pl, I get these errors :

Console en cours d'exécution...
Tentative d'installation de l'extension ayant pour signature : commerce-1.4.0-pl
Extension trouvée... préparation de l'installation.
Obtention de l'espace de travail de l'extension...
Espace de travail initialisé, installation de l'extension...
Checking minimum requirements...
- MODX 2.7+ (minimum): ✔ 2.8.5-pl
- MODX 2.7+ (minimum per 2019-11-27): ✔ 2.8.5-pl
- PHP 7.4+ (minimum): ✔ 8.2.14
- PHP 7.4+ (minimum per 2022-12-01): ✔ 8.2.14
Checking required PHP extensions...
- Enabled: curl, dom, fileinfo, gd, hash, iconv, json, libxml, openssl, pcre, simplexml, soap, xml, xmlreader, xmlwriter, zip, zlib
Checking (optional) recommended versions...
- PHP 8.1+ (minimum): ✔ 8.2.14
- PHP 8.1+ (minimum per 2023-11-26): ✔ 8.2.14
Minimum requirements look good! Do note that there are more requirements for enabling live mode on your shop, navigate to Extras > Commerce > Configuration to see if those requirements are met.
Installing files from /home/EFC/web/domain.fr/core/packages/commerce-1.4.0-pl/xPDOFileVehicle/60995f6539d71054ba13e6741540202e/ to /home/EFC/web/domain.fr/core/components/commerce
Attempting to preserve files at /home/EFC/web/domain.fr/core/components/commerce into archive /home/EFC/web/domain.fr/core/packages/commerce-1.4.0-pl/xPDOFileVehicle/60995f6539d71054ba13e6741540202e.preserved.zip
Installing files from /home/EFC/web/domain.fr/core/packages/commerce-1.4.0-pl/xPDOFileVehicle/4b32a06a0f6102c1634691881f9718e1/ to /home/EFC/web/domain.fr/public_html/assets/components/commerce
Attempting to preserve files at /home/EFC/web/domain.fr/public_html/assets/components/commerce into archive /home/EFC/web/domain.fr/core/packages/commerce-1.4.0-pl/xPDOFileVehicle/4b32a06a0f6102c1634691881f9718e1.preserved.zip
Installing/updating dependencies, this may take some time...
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Package php-http/message-factory is abandoned, you should avoid using it. Use psr/http-factory instead.
Generating optimized autoload files
18 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found
Error HY000 executing statement: Array ( [0] => HY000 [1] => 2006 [2] => MySQL server has gone away )
Could not find MODX.com provider; can't install dependencies
Installing dependency Guzzle7 v7.0.0 (or higher)...
Error HY000 executing statement: Array ( [0] => HY000 [1] => 2006 [2] => MySQL server has gone away )
Error HY000 executing statement: INSERT INTO `modx_session` (`id`, `access`, `data`) VALUES ('j00sevpaeljiiho9men34oc717', 1706623309, 'modx.user.contextTokens|a:1:{s:3:\"mgr\";i:1;}commerce_order_contents|a:4:{s:6:\"object\";a:35:{s:2:\"id\";N;s:9:\"class_key\";s:19:\"comSessionCartOrder\";s:10:\"properties\";s:1574:\"a:2:{s:16:\"expected_address\";a:4:{s:5:\"state\";s:0:\"\";s:7:\"country\";s:2:\"FR\";s:8:\"fullname\";s:18:\"Default Admin User\";s:5:\"email\";s:19:\"contact@me.fr\";}s:4:\"logs\";a:6:{i:0;a:5:{s:10:\"created_on\";i:1706622544;s:9:\"action_by\";i:1;s:6:\"public\";b:0;s:7:\"message\";s:23:\"commerce.log.item_added\";s:10:\"properties\";a:3:{s:2:\"id\";i:412;s:4:\"name\";s:21:\"Carotte sauvage 200ML\";s:8:\"quantity\";i:3;}}i:1;a:5:{s:10:\"created_on\";i:1706622555;s:9:\"action_by\";i:1;s:6:\"public\";b:0;s:7:\"message\";s:34:\"commerce.log.item_quantity_changed\";s:10:\"properties\";a:4:{s:2:\"id\";i:412;s:4:\"name\";s:21:\"Carotte sauvage 200ML\";s:15:\"quantity_before\";i:3;s:14:\"quantity_after\";i:4;}}i:2;a:5:{s:10:\"created_on\";i:1706622560;s:9:\"action_by\";i:1;s:6:\"public\";b:0;s:7:\"message\";s:34:\"commerce.log.item_quantity_changed\";s:10:\"properties\";a:4:{s:2:\"id\";i:412;s:4:\"name\";s:21:\"Carotte sauvage 200ML\";s:15:\"quantity_before\";i:4;s:14:\"quantity_after\";i:6;}}i:3;a:5:{s:10:\"created_on\";i:1706622565;s:9:\"action_by\";i:1;s:6:\"public\";b:0;s:7:\"message\";s:34:\"commerce.log.item_quantity_changed\";s:10:\"properties\";a:4:{s:2:\"id\";i:412;s:4:\"name\";s:21:\"Carotte sauvage 200ML\";s:15:\"quantity_before\";i:6;s:14:\"quantity_after\";i:9;}}i:4;a:5:{s:10:\"created_on\";i:1706623111;s:9:\"action_by\";i:1;s:6:\"public\";b:0;s:7:\"message\";s:26:\"commerce.log.address_added\";s:10:\"properties\";a:1:{s:4:\"type\";s:22:\"Adresse de facturation\";}}i:5;a:5:{s:10:\"created_on\";i:1706623111;s:9:\"action_by\";i:1;s:6:\"public\";b:0;s:7:\"message\";s:26:\"commerce.log.address_added\";s:10:\"properties\";a:1:{s:4:\"type\";s:20:\"Adresse de livraison\";}}}}\";s:6:\"secret\";s:0:\"\";s:4:\"test\";i:0;s:6:\"status\";i:1;s:14:\"payment_status\";s:14:\"partially_paid\";s:6:\"origin\";s:8:\"checkout\";s:8:\"currency\";s:3:\"EUR\";s:7:\"context\";s:3:\"web\";s:9:\"reference\";s:0:\"\";s:14:\"reference_incr\";i:0;s:8:\"subtotal\";i:8073;s:8:\"discount\";i:0;s:8:\"shipping\";i:1015;s:11:\"transaction\";i:0;s:16:\"total_before_tax\";i:9088;s:12:\"total_ex_tax\";i:7573;s:3:\"tax\";i:1515;s:5:\"total\";i:9088;s:16:\"total_authorized\";i:0;s:10:\"total_paid\";i:0;s:14:\"total_refunded\";i:0;s:9:\"total_due\";i:9088;s:14:\"total_quantity\";i:9;s:10:\"created_on\";i:0;s:11:\"received_on\";i:0;s:15:\"last_updated_on\";i:0;s:17:\"status_updated_on\";i:0;s:10:\"created_by\";i:0;s:15:\"last_updated_by\";i:0;s:17:\"status_updated_by\";i:0;s:15:\"shipping_method\";i:0;s:6:\"parent\";i:0;s:4:\"user\";i:1;}s:5:\"items\";a:1:{i:0;a:34:{s:2:\"id\";i:412;s:9:\"class_key\";s:12:\"comOrderItem\";s:10:\"properties\";N;s:5:\"order\";i:0;s:7:\"product\";i:64;s:3:\"idx\";i:10;s:8:\"currency\";s:3:\"EUR\";s:6:\"status\";i:0;s:12:\"allow_update\";i:1;s:15:\"is_manual_price\";i:0;s:9:\"tax_group\";i:6;s:13:\"delivery_type\";i:1;s:8:\"shipment\";i:552;s:3:\"sku\";s:19:\"C-CS-23/22/HA-200ML\";s:4:\"name\";s:21:\"Carotte sauvage 200ML\";s:12:\"name_primary\";s:21:\"Carotte sauvage 200ML\";s:4:\"link\";s:0:\"\";s:11:\"description\";s:8:\"23/22/HA\";s:19:\"description_primary\";s:8:\"23/22/HA\";s:5:\"price\";i:897;s:13:\"regular_price\";i:897;s:11:\"price_label\";s:0:\"\";s:5:\"image\";s:34:\"/assets/images/dessins/fleur-2.png\";s:8:\"quantity\";i:9;s:21:\"subtotal_before_extra\";i:8073;s:5:\"extra\";i:0;s:8:\"subtotal\";i:8073;s:8:\"discount\";i:0;s:8:\"shipping\";i:0;s:16:\"total_before_tax\";i:8073;s:12:\"total_ex_tax\";i:6727;s:3:\"tax\";i:1346;s:5:\"total\";i:8073;s:7:\"comment\";s:0:\"\";}}s:9:\"shipments\";a:1:{i:0;i:552;}s:9:\"addresses\";a:2:{s:7:\"billing\";i:70;s:8:\"shipping\";i:71;}}modx.user.0.resourceGroups|a:1:{s:3:\"mgr\";a:0:{}}modx.user.0.attributes|a:2:{s:3:\"web\";a:5:{s:16:\"modAccessContext\";a:1:{s:3:\"web\";a:1:{i:0;a:3:{s:9:\"principal\";i:0;s:9:\"authority\";i:0;s:6:\"policy\";a:3:{s:4:\"load\";b:1;s:6:\"formit\";b:1;s:18:\"formit_encryptions\";b:0;}}}}s:22:\"modAccessResourceGroup\";a:0:{}s:17:\"modAccessCategory\";a:0:{}s:28:\"sources.modAccessMediaSource\";a:0:{}s:18:\"modAccessNamespace\";a:0:{}}s:3:\"mgr\";a:5:{s:16:\"modAccessContext\";a:1:{s:3:\"web\";a:1:{i:0;a:3:{s:9:\"principal\";i:0;s:9:\"authority\";i:0;s:6:\"policy\";a:3:{s:4:\"load\";b:1;s:6:\"formit\";b:1;s:18:\"formit_encryptions\";b:0;}}}}s:22:\"modAccessResourceGroup\";a:0:{}s:17:\"modAccessCategory\";a:0:{}s:28:\"sources.modAccessMediaSource\";a:0:{}s:18:\"modAccessNamespace\";a:0:{}}}modx.mgr.user.token|s:52:\"modx648f024ce65298.04753734_165b8fb61452303.79765696\";modx.mgr.session.cookie.lifetime|i:604800;modx.mgr.user.config|a:0:{}modx.user.1.userGroupNames|a:1:{i:0;s:13:\"Administrator\";}modx.user.1.userGroups|a:1:{i:0;i:1;}csrf_tokens|a:2:{s:4:\"grid\";s:192:\"MTcwNjYyMTgzMy0tMS0tNzZmOGFkYWQyODFhOGNjY2UwZGI0ODg5MWQzOTA0MzZmZDljMGVmNGJiNGMwZGQ4ZWM1NTQ4MjIyNTI0OTRmN2NkMDI0YmVmNTE5MWU0YmRlNTkyZTk4NGI3ZjZkYTcyYmVlODcyMjEzMTQxNzJiMTIxNGNlZWYwNDk0ZjA4OTg=\";s:4:\"form\";s:192:\"MTcwNjYyMTg2My0tMS0tMmQzZDhmOTY1ZGRkZDNkYjE2MGRhZjE2NWIwYzI0NTE5NGExY2MyMGJmOWRjNDUzOTAxYzY4ZWUyYTkyZDkwNzkyNjUzNjQzZjljZTk5YTllNDliNjM4ZjdkMjg0ZjIxODU3MzYzMzYyYmNjODY5MzNmYjdjNzU3ZDFjMGFhMGY=\";}') Array ( [0] => HY000 [1] => 2006 [2] => MySQL server has gone away )
PHP warning: PHP Request Shutdown: Failed to write session data using user defined save handler. (session.save_path: /home/EFC/tmp, handler: update_timestamp)

It’s said than mysql gone away, but Mysql is running correctly…

The installing dependencies step probably took longer than your MySQL idle timeout. If you try it a few times does it happen each time?