LuckPerms

LuckPerms

41.4k Downloads

Database Querries Limiter

AleXutzZu opened this issue ยท 8 comments

commented

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
commented

You can reduce the maximum-pool-size value to limit the number of open connections.

commented

Well, I have like 5 servers connected to the same DB, do I need to edit this setting on all of my instances?

commented

@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?

commented

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.

commented

They have limited it as there have been over 50 connections on the MySQL end. (all from LuckPerms)

commented

There is only a very tiny overhead per connection, there's really no reason why they should be harshly limited

commented

Well, that's what they said and sent me some screenshots of all queries

commented

Okay, well that's an issue between you and your hosting provider. I can't really do anything to help you there. :)

I've explained how to reduce the number of connections above.