From bd0503b492e1b5a7ee302895a16f2d98e8610a88 Mon Sep 17 00:00:00 2001 From: Deckard Date: Sun, 19 Oct 2025 05:33:43 -0400 Subject: [PATCH] Improve MySQL configuration and normalize SmartAI action flags --- .env.template | 2 ++ README.md | 6 ++++++ compose.yml | 2 ++ scripts/sql/custom/world/2025-10-19-smartai-fixes.sql | 9 +++++++-- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.env.template b/.env.template index 16f7423..afa95cc 100644 --- a/.env.template +++ b/.env.template @@ -9,6 +9,7 @@ COMPOSE_PROJECT_NAME=acore-compose # Storage & Timezone # ===================== STORAGE_PATH=./storage +HOST_ZONEINFO_PATH=/usr/share/zoneinfo TZ=UTC # ===================== @@ -26,6 +27,7 @@ MYSQL_COLLATION=utf8mb4_unicode_ci MYSQL_MAX_CONNECTIONS=1000 MYSQL_INNODB_BUFFER_POOL_SIZE=256M MYSQL_INNODB_LOG_FILE_SIZE=64M +MYSQL_INNODB_REDO_LOG_CAPACITY=512M MYSQL_RUNTIME_TMPFS_SIZE=8G # DB names diff --git a/README.md b/README.md index d084f6f..f3733d7 100644 --- a/README.md +++ b/README.md @@ -306,6 +306,12 @@ When C++ modules are enabled, the system automatically: 3. Rebuilds server images with modules compiled in 4. Tags custom images for deployment +### MySQL Runtime Storage & Timezone Data + +- `MYSQL_RUNTIME_TMPFS_SIZE` controls the in-memory datadir used by the MySQL container. Increase this value if you see `No space left on device` errors inside `/var/lib/mysql-runtime`. +- `MYSQL_INNODB_REDO_LOG_CAPACITY` increases redo log headroom (defaults to `512M`). Raise it further if logs report `log_checkpointer` lag. +- `HOST_ZONEINFO_PATH` should point to a host directory containing timezone definitions (defaults to `/usr/share/zoneinfo`). The path is mounted read-only so the container can load timezone tables without extra image customization. Set it to a valid directory on your host if your OS stores zoneinfo elsewhere. + --- ## 🔧 Troubleshooting diff --git a/compose.yml b/compose.yml index c74738c..76296bc 100644 --- a/compose.yml +++ b/compose.yml @@ -22,6 +22,7 @@ services: volumes: - ${STORAGE_PATH:-./storage}/mysql-data:/var/lib/mysql-persistent - ${HOST_BACKUP_PATH:-${STORAGE_PATH:-./storage}/backups}:/backups + - ${HOST_ZONEINFO_PATH:-/usr/share/zoneinfo}:/usr/share/zoneinfo:ro tmpfs: - /var/lib/mysql-runtime:size=${MYSQL_RUNTIME_TMPFS_SIZE:-8G} command: @@ -33,6 +34,7 @@ services: - --max_connections=${MYSQL_MAX_CONNECTIONS:-1000} - --innodb-buffer-pool-size=${MYSQL_INNODB_BUFFER_POOL_SIZE:-256M} - --innodb-log-file-size=${MYSQL_INNODB_LOG_FILE_SIZE:-64M} + - --innodb-redo-log-capacity=${MYSQL_INNODB_REDO_LOG_CAPACITY:-512M} restart: unless-stopped healthcheck: test: ["CMD", "sh", "-c", "mysqladmin ping -h localhost -u ${MYSQL_USER:-root} -p${MYSQL_ROOT_PASSWORD:-azerothcore123} --silent || exit 1"] diff --git a/scripts/sql/custom/world/2025-10-19-smartai-fixes.sql b/scripts/sql/custom/world/2025-10-19-smartai-fixes.sql index a082ec4..e54c76b 100644 --- a/scripts/sql/custom/world/2025-10-19-smartai-fixes.sql +++ b/scripts/sql/custom/world/2025-10-19-smartai-fixes.sql @@ -1,5 +1,10 @@ --- Fix SmartAI boolean parameters for action 53 (Start Waypoint) on specific creatures. --- This script is idempotent and can be executed multiple times safely. + +-- Normalize Start Waypoint boolean flags that were set to invalid values (e.g., 2 instead of 0/1). +UPDATE smart_scripts +SET action_param1 = 1 +WHERE action_type = 53 + AND source_type IN (0, 9) + AND action_param1 NOT IN (0, 1); UPDATE smart_scripts SET action_param1 = 1