Engine & DB Tuning
Sizing oxmysql Connection Pools & Slow-Query Warning Budgets
Calibrate connectionLimit (10-80) and mysql_slow_query_warning in server.cfg so inventory and player-load queries stay under 15 ms p95.
100-150 ms Warn Threshold · 20-65 Pool · Sub-15 ms p95
Why Too Small a Pool Stalls Player Joins
When 40 players reconnect simultaneously after a txAdmin restart, scripts fire hundreds of parallel MySQL.query calls. A default 10-connection pool queues queries behind socket waits, triggering 300+ ms oxmysql slow-query warnings.
Avoid Over-Allocating 200+ Idle Connections
Setting connectionLimit above 80 wastes MariaDB thread buffers without improving throughput. Match connectionLimit to 20-65 and ensure MariaDB max_connections is at least 3x higher.
Measured Thresholds & Server Configuration
| Player Slots | oxmysql connectionLimit | mysql_slow_query_warning |
|---|---|---|
| 128 Slots | 20 connections | 150 ms |
| 256 Slots | 30 - 35 connections | 150 ms |
| 384 - 512 Slots | 45 - 65 connections | 100 - 150 ms |