Jump to content

Extreme lag saving when MySQL is down

Pending 2.1.7


I had a problem today where my, MySQL was not responding. That one is one me for sure 🙂

The problem was, when the plugin was saving it gave a extreme lag spick where the server "stopped" for 3 sec at the time. So I was thing if a "savefail check" can be added.

If it fails to save [A set amount in cfg], it will stop saving to the MySQL until the plugin is restarted.
Sending an error message to the server console saying: Too many failed MySQL attempts or something every time the plugin saves, so its easy to spot for the server owner.

  "MySQL": {
    "MaxSaveAttempt": 2,

Hope this is usefully information, and its not to big of a operation to fix

Share this comment

Link to comment


I'll have a to have a think about that. 'Too many failed MySQL attempts' isn't something I'd expect to see as, as far as I know, there is no auto-retry.
There is, however, a connection timeout in the event of failure. I think that's 10 seconds and certainly there can be a lag if that happens.


Is PlayerRanks the only plugin you have using SQL?

Edited by Steenamaroo

Share this comment

Link to comment

PlayerRanks is the only plugin using the MySQL, And the lag happend when the plugin was saving.
Have tuned the MySQL options off for now, And sens then I have had no problems with lag

11:15 [Warning] [PlayerRanks] Unable to connect to any of the specified MySQL hosts.
11:15 [Warning] [PlayerRanks] PlayerRanks database saved.

This is the log I have, a error handling for No connection, SQL errors and other stuff would be great
Appreciate your fast reply 🙂

Share this comment

Link to comment

If you're sure that your SQL credentials are correct in PlayerRanks config then you may need to whitelist your rust server IP at your SQL host.
That may be listed as 'remote access'.

The IP you need to whitelist usually isn't the same IP players use to connect - If you're unsure you might need to ask your Rust host for the correct IP to whitelist.

Share this comment

Link to comment


Total number of downloads.



Total customers served.


Files Sold

Total number of files sold.


Payments Processed

Total payments processed.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.