0

I have a website I had worked on but never finished, last year. It is at version 8.5.4.

I've imported it (from a devdesktop environment) into a Docker/Docksal environment. At this point I can see a working site. Then when I go to the docroot in drush and try to "drush up drupal" I get a big error that I don't understand. Starting with MySQL server has gone away. And the site is completely destroyed. I end up having to redo everything. Maybe someone can shed light on this. I also tried just updating to an inbetween version 8.6, and still got errors. Here's what I get:

    fin drush up drupal

    PDOStatement::execute(): MySQL server has gone away Statement.php:59 [warning]
    PDOStatement::execute(): Error reading result set's header           [warning]
    Statement.php:59
    Failed to log error: PDOException: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known in Drupal\dblog\Logger\DbLog->log() (line 102 of /var/www/docroot/core/modules/dblog/src/Logger/DbLog.php). #0 /var/www/docroot/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(149): PDO->__construct('mysql:host=db;p...', 'root', 'root', Array)
    #1 /var/www/docroot/core/lib/Drupal/Core/Database/Database.php(376): Drupal\Core\Database\Driver\mysql\Connection::open(Array)
    #2 /var/www/docroot/core/lib/Drupal/Core/Database/Database.php(166): Drupal\Core\Database\Database::openConnection('default', 'dedicated_dblog')
    #3 /var/www/docroot/core/modules/dblog/src/Logger/DbLog.php(102): Drupal\Core\Database\Database::getConnection('dedicated_dblog', 'default')
    #4 /var/www/docroot/core/lib/Drupal/Core/Logger/LoggerChannel.php(136): Drupal\dblog\Logger\DbLog->log(3, 'Container canno...', Array)
    #5 /var/www/docroot/vendor/psr/log/Psr/Log/LoggerTrait.php(70): Drupal\Core\Logger\LoggerChannel->log(3, 'Container canno...', Array)
    #6 /var/www/docroot/core/lib/Drupal/Core/DrupalKernel.php(950): Drupal\Core\Logger\LoggerChannel->error('Container canno...')
    #7 phar:///usr/local/bin/drush8/lib/Drush/Drupal/DrupalKernel.php(61): Drupal\Core\DrupalKernel->initializeContainer()
    #8 /var/www/docroot/core/lib/Drupal/Core/DrupalKernel.php(469): Drush\Drupal\DrupalKernel->initializeContainer()
    #9 phar:///usr/local/bin/drush8/lib/Drush/Boot/DrupalBoot8.php(146): Drupal\Core\DrupalKernel->boot()
    #10 phar:///usr/local/bin/drush8/includes/bootstrap.inc(354): Drush\Boot\DrupalBoot8->bootstrap_drupal_full()
    #11 phar:///usr/local/bin/drush8/includes/bootstrap.inc(473): drush_bootstrap(5, 6)
    #12 phar:///usr/local/bin/drush8/lib/Drush/Boot/BaseBoot.php(59): drush_bootstrap_to_phase(6)
    #13 phar:///usr/local/bin/drush8/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
    #14 phar:///usr/local/bin/drush8/includes/startup.inc(465): drush_main()
    #15 phar:///usr/local/bin/drush8/includes/startup.inc(369): drush_run_main(false, '/', 'Phar detected. ...')
    #16 phar:///usr/local/bin/drush8/drush(114): drush_startup(Array)
    #17 /usr/local/bin/drush8(10): require('phar:///usr/loc...')
    #18 {main}
    PDOException: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/docroot/core/modules/dblog/src/Logger/DbLog.php on line 102 #0 /var/www/docroot/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(149): PDO->__construct('mysql:host=db;p...', 'root', 'root', Array)
    #1 /var/www/docroot/core/lib/Drupal/Core/Database/Database.php(376): Drupal\Core\Database\Driver\mysql\Connection::open(Array)
    #2 /var/www/docroot/core/lib/Drupal/Core/Database/Database.php(166): Drupal\Core\Database\Database::openConnection('default', 'dedicated_dblog')
    #3 /var/www/docroot/core/modules/dblog/src/Logger/DbLog.php(102): Drupal\Core\Database\Database::getConnection('dedicated_dblog', 'default')
    #4 /var/www/docroot/core/lib/Drupal/Core/Logger/LoggerChannel.php(136): Drupal\dblog\Logger\DbLog->log(3, 'Container canno...', Array)
    #5 /var/www/docroot/vendor/psr/log/Psr/Log/LoggerTrait.php(70): Drupal\Core\Logger\LoggerChannel->log(3, 'Container canno...', Array)
    #6 /var/www/docroot/core/lib/Drupal/Core/DrupalKernel.php(950): Drupal\Core\Logger\LoggerChannel->error('Container canno...')
    #7 phar:///usr/local/bin/drush8/lib/Drush/Drupal/DrupalKernel.php(61): Drupal\Core\DrupalKernel->initializeContainer()
    #8 /var/www/docroot/core/lib/Drupal/Core/DrupalKernel.php(469): Drush\Drupal\DrupalKernel->initializeContainer()
    #9 phar:///usr/local/bin/drush8/lib/Drush/Boot/DrupalBoot8.php(146): Drupal\Core\DrupalKernel->boot()
    #10 phar:///usr/local/bin/drush8/includes/bootstrap.inc(354): Drush\Boot\DrupalBoot8->bootstrap_drupal_full()
    #11 phar:///usr/local/bin/drush8/includes/bootstrap.inc(473): drush_bootstrap(5, 6)
    #12 phar:///usr/local/bin/drush8/lib/Drush/Boot/BaseBoot.php(59): drush_bootstrap_to_phase(6)
    #13 phar:///usr/local/bin/drush8/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
    #14 phar:///usr/local/bin/drush8/includes/startup.inc(465): drush_main()
    #15 phar:///usr/local/bin/drush8/includes/startup.inc(369): drush_run_main(false, '/', 'Phar detected. ...')
    #16 phar:///usr/local/bin/drush8/drush(114): drush_startup(Array)
    #17 /usr/local/bin/drush8(10): require('phar:///usr/loc...')
    #18 {main}
    Drush command terminated abnormally due to an unrecoverable error.   [error]
    Error: PDO::__construct(): php_network_getaddresses: getaddrinfo
    failed: Name or service not known in
    /var/www/docroot/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php,
    line 149
    PDOException: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known in Drupal\dblog\Logger\DbLog->log() (line 102 of /var/www/docroot/core/modules/dblog/src/Logger/DbLog.php).
  • Wild guess - remove the lines Acquia Dev Desktop automatically adds to settings.php – Clive May 10 at 18:51
  • @Clive yeah... tried that, but still didn't work. I'm wondering if it's some sort of MySQL memory issue. But I'm not sure how I increase that in Docksal. Heck, I can't even install the MemCache module for D8 and activate it. That kills the database too. – turpentyne May 10 at 20:56
  • The “gone away” message is typically when max_allowed_packet is too low in my.cnf, but I’ve never seen it result in the other message so I’m not sure it’s the same thing – Clive May 11 at 9:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.