Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving large amount of players times out SQL. #69

Open
andrewkm opened this issue Jan 12, 2024 · 2 comments
Open

Moving large amount of players times out SQL. #69

andrewkm opened this issue Jan 12, 2024 · 2 comments

Comments

@andrewkm
Copy link

andrewkm commented Jan 12, 2024

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.

@Phoenix616
Copy link
Member

Phoenix616 commented Jan 12, 2024

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)

@andrewkm
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants