Jump to content

Extreme lag saving when MySQL is down

Pending 2.1.7

Bjarke Håå
Bjarke Håå

Posted

Hi

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.

eg
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

  • Administrator
Steenamaroo

Posted (edited)

Hi,

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
Bjarke Håå

Posted

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 🙂

  • Administrator
Steenamaroo

Posted

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.

Bjarke Håå

Posted

It have been working just fine for the last couple months. This was only a problem when the MySQL was down. Then the lag started

  • Administrator
Steenamaroo

Posted

Oh, sorry. I see.

To be honest I'm not sure if there's much more I can do in terms of error handling but I will take a look.

  • Love 1
1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.2k

Files Sold

Total number of files sold.

2m

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.