Database Querries Limiter
Closed this issue ยท 8 comments
I'd like to know how can I limit the amount of pool connections to my MySQL database as it sends to many connections and my hosting company has restricted the IP address.
(These are the current settings)
pool-settings:
maximum-pool-size: 10
minimum-idle: 1
maximum-lifetime: 1800000 # 30 minutes
connection-timeout: 5000 # 5 seconds
Well, I have like 5 servers connected to the same DB, do I need to edit this setting on all of my instances?
@lucko (sorry for the tag) but how much should I decrease the maximum-pool-size value and do I need to decrease it on all of my bungeecord instances?
You need to edit the setting in all places where you want the change to apply.
Regarding what it should be set to, my opinion is that 10
is a sane default, but if your hosting company is imposing limitations on you, perhaps you could reduce it to 5
?
Setting minimum-idle: 1
will mean that the plugin will only keep 1 connection around, and it will kill off the other 9 if they're not needed anymore.
I suggest you speak to your hosting provider and ask them to increase the limit. There is only a very tiny overhead per connection, there's really no reason why they should be harshly limited.
They have limited it as there have been over 50 connections on the MySQL end. (all from LuckPerms)
There is only a very tiny overhead per connection, there's really no reason why they should be harshly limited