Moving large amount of players times out SQL.
andrewkm opened this issue ยท 2 comments
After server startup, moving a large amount of players from one server to another (one with CSN) causes this spam:
https://pastebin.com/raw/EFiMi2FT
No other MySQL utilizing plugin causes this, and we have dozens.
It's always just been a ChestShopNotifier issue.
Plugin functions perfectly fine afterwards, just wondering if there's any value we can increase/change to prevent these from happening in the first place.
Basically on login CSN will try to query tho notifications for the player. To do that a connection is requested from the HikariCP connection pool. The error just means that it didn't get a connection after 5 seconds.
You could try increasing the amount of MySQL connections that your server allows to be opened at the same time as well as see if these optimizations are applied to speed up query speed in general.
Would also be interesting to know how many players we are talking about and how many connections your server currently allows.
EDIT: Actually it seems like this is more likely to be influenced by HikariCP's max pool size which as far as I can tell could only be modified when the option is either exposed via the plugin or when overriding the HikariCP config file via a system property (but that would change the pool for all plugins that use it which isn't ideal either). The value should be at a pretty solid default already (10) so making sure the queries are as fast as possible (e.g. with the previously mentioned caching) would be a better approach without any editing of code itself. (But I will think about how to better handle such a case too)
I tried the cache settings but was having trouble with MySQL 8.0.35 even accepting them.
My max connections is increased to 1,000 so highly doubt I'm hitting that, hmm.
Amount of players was about 60 during the move I believe. Was done by sending from one server to another via Bungee console.