Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL server has gone away #2703

Closed
Julien-Marcou opened this issue Apr 4, 2017 · 2 comments
Closed

MySQL server has gone away #2703

Julien-Marcou opened this issue Apr 4, 2017 · 2 comments

Comments

@Julien-Marcou
Copy link

It seems to be related to #1747, I'm using Drush 8.1.10 and when I'm trying to execute "exit;" with the PHP Cli of "drush php" the following error happens:

$ drush php
Psy Shell v0.7.2 (PHP 5.6.30-5.6.30~deb8+nbs20170130 — cli) by Justin Hileman
>>> exit;
Exit:  Goodbye.
PDOStatement::execute(): MySQL server has gone away Statement.php:59                                                                                                                                                                                                [warning]
PDOStatement::execute(): Error reading result set's header Statement.php:59                                                                                                                                                                                         [warning]
Drupal\Core\Database\DatabaseExceptionWrapper thrown while calling __toString on a Drupal\Core\StringTranslation\TranslatableMarkup object in                                                                                                                       [error]
/srv/www/drupal8/src/web/core/lib/Drupal/Core/Database/Connection.php on line 671: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT s.*, t.language AS language, t.translation AS
translation, t.customized AS customized
FROM 
{locales_source} s
LEFT OUTER JOIN {locales_target} t ON t.lid = s.lid AND t.language = :langcode
WHERE  (s.source IN  (:db_condition_placeholder_0)) AND (s.context IN  (:db_condition_placeholder_1)); Array
(
    [:db_condition_placeholder_0] => Returned from hook @hook
    [:db_condition_placeholder_1] => 
    [:langcode] => en
)
 ToStringTrait.php:20

Also, I'm on my production server here (where the datebase is on a distant server), I got a slightly different error on local:

$ drush php
Psy Shell v0.7.2 (PHP 5.6.30-0+deb8u1 — cli) by Justin Hileman
>>> exit;
Exit:  Goodbye.
Drupal\Core\Database\DatabaseExceptionWrapper thrown while calling __toString on a Drupal\Core\StringTranslation\TranslatableMarkup object in /srv/www/drupal8/src/web/core/lib/Drupal/Core/Database/Connection.php on line 671: SQLSTATE[HY000]: General error:    [error]
2006 MySQL server has gone away: SELECT s.*, t.language AS language, t.translation AS translation, t.customized AS customized
FROM 
{locales_source} s
LEFT OUTER JOIN {locales_target} t ON t.lid = s.lid AND t.language = :langcode
WHERE  (s.source IN  (:db_condition_placeholder_0)) AND (s.context IN  (:db_condition_placeholder_1)); Array
(
    [:db_condition_placeholder_0] => Returned from hook @hook
    [:db_condition_placeholder_1] => 
    [:langcode] => en
)
 ToStringTrait.php:20
@damiankloip
Copy link
Contributor

Hmm, not seen that one before :) We fixed a couple of things (including some upstream stuff in Psysh itself) that helps with error on exit. I've sen issues on exit, not that exact error though. They are all database related, in any case. Can you try the latest drush master and see if you see the same error?

@damiankloip
Copy link
Contributor

Haven't heard back on this for a while, we fixed a few things related to the DB connection and forking processes, including some upstream fixes in Psysh itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants