Sometimes you might have the requirement to override MySQL's default setting for wait_timeout
on Acquia Cloud Platform or Acquia Cloud Site Factory.
One possible situation, is your logs may be showing messages like these:
While implementing an override cannot be done on the MySQL server configuration, directly, as this level of configuration is centrally managed, you can override that setting on a 'per session' basis, i.e. for every PHP process that bootstraps Drupal.
The following provides details for configuring the MySQL wait_timeout
value, depending upon your application installation configuration.
Verifying the MySQL transaction settings¶
You can verify the MySQL transaction setting using the following Drush
command:
- Run the following
Drush
command:drush eval 'print_r(Drupal\Core\Database\Database::getConnection("default", "default")->query("SHOW VARIABLES LIKE '\'wait_timeout\'';")->fetchObject());'
- Expected output:
drush eval 'print_r(Drupal\Core\Database\Database::getConnection("default", "default")->query("SHOW VARIABLES LIKE '\'transaction_isolation\'';")->fetchObject());'
stdClass Object
(
[Variable_name] => wait_timeout
[Value] => 1200
)
Did not find what you were looking for?
If this content did not answer your questions, try searching or contacting our support team for further assistance.