Merge pull request #1510 from PineappleIOnic/fix-sql-timeout
Initial Fix
This commit is contained in:
commit
6ccfcd061d
|
@ -166,7 +166,6 @@ $register->set('dbPool', function () { // Register DB connection
|
||||||
$dbPass = App::getEnv('_APP_DB_PASS', '');
|
$dbPass = App::getEnv('_APP_DB_PASS', '');
|
||||||
$dbScheme = App::getEnv('_APP_DB_SCHEMA', '');
|
$dbScheme = App::getEnv('_APP_DB_SCHEMA', '');
|
||||||
|
|
||||||
|
|
||||||
$pool = new PDOPool((new PDOConfig())
|
$pool = new PDOPool((new PDOConfig())
|
||||||
->withHost($dbHost)
|
->withHost($dbHost)
|
||||||
->withPort($dbPort)
|
->withPort($dbPort)
|
||||||
|
@ -174,6 +173,9 @@ $register->set('dbPool', function () { // Register DB connection
|
||||||
->withCharset('utf8mb4')
|
->withCharset('utf8mb4')
|
||||||
->withUsername($dbUser)
|
->withUsername($dbUser)
|
||||||
->withPassword($dbPass)
|
->withPassword($dbPass)
|
||||||
|
->withOptions([
|
||||||
|
PDO::ATTR_ERRMODE => App::isDevelopment() ? PDO::ERRMODE_WARNING : PDO::ERRMODE_SILENT, // If in production mode, warnings are not displayed
|
||||||
|
])
|
||||||
, 16);
|
, 16);
|
||||||
|
|
||||||
return $pool;
|
return $pool;
|
||||||
|
|
|
@ -342,7 +342,7 @@ services:
|
||||||
- MYSQL_DATABASE=${_APP_DB_SCHEMA}
|
- MYSQL_DATABASE=${_APP_DB_SCHEMA}
|
||||||
- MYSQL_USER=${_APP_DB_USER}
|
- MYSQL_USER=${_APP_DB_USER}
|
||||||
- MYSQL_PASSWORD=${_APP_DB_PASS}
|
- MYSQL_PASSWORD=${_APP_DB_PASS}
|
||||||
command: 'mysqld --innodb-flush-method=fsync --wait_timeout=86400'
|
command: 'mysqld --innodb-flush-method=fsync'
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:6.0-alpine3.12
|
image: redis:6.0-alpine3.12
|
||||||
|
|
|
@ -397,7 +397,7 @@ services:
|
||||||
- MYSQL_DATABASE=${_APP_DB_SCHEMA}
|
- MYSQL_DATABASE=${_APP_DB_SCHEMA}
|
||||||
- MYSQL_USER=${_APP_DB_USER}
|
- MYSQL_USER=${_APP_DB_USER}
|
||||||
- MYSQL_PASSWORD=${_APP_DB_PASS}
|
- MYSQL_PASSWORD=${_APP_DB_PASS}
|
||||||
command: 'mysqld --innodb-flush-method=fsync --wait_timeout=86400' # add ' --query_cache_size=0' for DB tests
|
command: 'mysqld --innodb-flush-method=fsync' # add ' --query_cache_size=0' for DB tests
|
||||||
# command: mv /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile0.bu && mv /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile1.bu
|
# command: mv /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile0.bu && mv /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile1.bu
|
||||||
|
|
||||||
# smtp:
|
# smtp:
|
||||||
|
|
Loading…
Reference in a new issue