Skip to content

Commit

Permalink
ACMS-736: Temporary workaround for MySql timeout on ACE. (acquia#773)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdruckman authored Apr 20, 2021
1 parent e92f622 commit 017f2c8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions patches/d9-acms-settings.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,20 @@ $site_name = AcquiaDrupalEnvironmentDetector::getSiteName($site_path);
if (AcquiaDrupalEnvironmentDetector::isAhEnv()) {
$ah_group = AcquiaDrupalEnvironmentDetector::getAhGroup();
if (!AcquiaDrupalEnvironmentDetector::isAcsfEnv()) {
global $conf, $databases;
$conf['acquia_hosting_settings_autoconnect'] = FALSE;
if ($site_name == 'default') {
require "/var/www/site-php/$ah_group/$ah_group-settings.inc";
} else {
// Acquia Cloud does not support periods in db names.
$safe_site_name = str_replace('.', '_', $site_name);
require "/var/www/site-php/$ah_group/$safe_site_name-settings.inc";
}
// Temporary workaround to override the default MySQL wait_timeout setting.
$databases['default']['default']['init_commands'] = array(
'wait_timeout' => "SET SESSION wait_timeout=1200",
);
acquia_hosting_db_choose_active();
}
}

Expand Down

0 comments on commit 017f2c8

Please sign in to comment.