Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
phd5-app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dmstr
phd5-app
Commits
11c11cac
Commit
11c11cac
authored
Feb 08, 2023
by
Jens Giessmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
patch feature/cli-dbsys-wait-timeout into master
#3
parent
423d5f94
Pipeline
#74040
passed with stage
in 3 minutes and 43 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
console.php
config/console.php
+15
-0
env-defaults
config/env-defaults
+3
-0
No files found.
config/console.php
View file @
11c11cac
...
...
@@ -83,6 +83,21 @@ return [
],
],
],
'dbSystem'
=>
[
'on '
.
yii\db\Connection
::
EVENT_AFTER_OPEN
=>
function
(
$event
)
{
if
(
$event
->
sender
->
driverName
===
'mysql'
)
{
// set session wait_timeout for this connection to mysql default value to prevent connection-timeouts
// in e.g. audit module while exec long-running CLI processes
$event
->
sender
->
createCommand
(
'SET SESSION wait_timeout = :timeout;'
,
[
':timeout'
=>
(
int
)
getenv
(
'DB_ENV_MYSQL_CLI_WAIT_TIMEOUT'
)
?:
28800
]
)
->
execute
();
}
},
],
],
'modules'
=>
[
'user'
=>
[
...
...
config/env-defaults
View file @
11c11cac
...
...
@@ -116,6 +116,9 @@ DATABASE_USER=${DB_ENV_MYSQL_USER}
DATABASE_PASSWORD=${DB_ENV_MYSQL_PASSWORD}
DATABASE_TABLE_PREFIX=app_
# set session wait_timeout for cli dbSystem mysql connection to prevent connection-timeouts
DB_ENV_MYSQL_CLI_WAIT_TIMEOUT=28800
# Cache
# -----
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment