Repository navigation
v2.14.3 Fixed Cross Server Sync
·
20 commits
to master
since this release
Update to the MySQL fix with full multi-server variable sync support.
What's New
Multi-Server Variable Sync
Variables can now be synced between multiple servers via a shared MySQL database. Each server gets a unique identifier — when one server writes a variable, the others detect the change and update their in-memory state automatically.
Bug Fixes
- Connection recovery: after a reconnect,
autoCommitand all prepared statements (write, delete, monitor, cleanup) are now properly restored — previously sync would silently break after any connection interruption - No duplicate connections:
open()now closes the old connection before creating a new one, preventing connection leaks - Reconnect logging: reconnect events are now logged (
reconnected successfully!/reconnect failed!) instead of failing silently
Enable Sync
In config.sk on all servers that share the database:
databases:
database 1:
type: MySQL
pattern: .*
monitor changes: true
monitor interval: 10 seconds
host: your_host
port: 3306
user: your_user
password: your_password
database: your_database
table: variables21Important
Set pattern, monitor changes, and monitor interval to the same values on all servers sharing the database.
Recommended Intervals
| Interval | Sync Delay | DB Load | Use Case |
|---|---|---|---|
5 seconds |
~5s | Higher | Real-time critical (economy, ranks, live stats) |
10 seconds |
~10s | Medium | Recommended for most setups |
20 seconds |
~20s | Low | Default, safe choice for rarely changed data |
60 seconds |
~60s | Minimal | Config/settings sync only |