Skip to content

Commit

Permalink
add mysql timeout env (#4584)
Browse files Browse the repository at this point in the history
  • Loading branch information
aynsix authored Feb 19, 2025
1 parent e3789b6 commit 3495492
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,14 @@ MYSQL_QUERY_CACHE_SIZE=64M
# @run
MYSQL_KEY_BUFFER_SIZE=128M

# Value applied to "connect_timeout" MySQL server setting.
# @run
MYSQL_CONNECT_TIMEOUT=60

# Value applied to "wait_timeout" MySQL server setting.
# @run
MYSQL_WAIT_TIMEOUT=600

# This Environment variable will run mariadb-upgrade is essential when mariadb version changes.
# @run
MARIADB_AUTO_UPGRADE=1
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.altenatives.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ services:
- MYSQL_QUERY_CACHE_LIMIT
- MYSQL_QUERY_CACHE_SIZE
- MYSQL_KEY_BUFFER_SIZE
- MYSQL_CONNECT_TIMEOUT
- MYSQL_WAIT_TIMEOUT
volumes:
- ${PHRASEANET_DB_DIR}_mysql8:/var/lib/mysql:rw
networks:
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.datastores.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ services:
- MYSQL_QUERY_CACHE_LIMIT
- MYSQL_QUERY_CACHE_SIZE
- MYSQL_KEY_BUFFER_SIZE
- MYSQL_CONNECT_TIMEOUT
- MYSQL_WAIT_TIMEOUT
- MARIADB_AUTO_UPGRADE
volumes:
- ${PHRASEANET_DB_DIR}:/var/lib/mysql
Expand Down
5 changes: 4 additions & 1 deletion docker/db/docker/custom.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ slow_query_log=$MYSQL_SLOW_QUERY_LOG
query_cache_limit=$MYSQL_QUERY_CACHE_LIMIT
query_cache_size=$MYSQL_QUERY_CACHE_SIZE

key_buffer_size=$MYSQL_KEY_BUFFER_SIZE
key_buffer_size=$MYSQL_KEY_BUFFER_SIZE

connect_timeout=$MYSQL_CONNECT_TIMEOUT
wait_timeout=$MYSQL_WAIT_TIMEOUT

0 comments on commit 3495492

Please sign in to comment.