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

Duplicate database connections on server reload #117

Open
igorekudashev opened this issue Apr 16, 2022 · 1 comment
Open

Duplicate database connections on server reload #117

igorekudashev opened this issue Apr 16, 2022 · 1 comment
Assignees
Labels
BUG Something isn't working

Comments

@igorekudashev
Copy link

Describe the issue
When loaded, the plugin creates about 15 database connections. If you restart the server using /reload, then the plugin will re-create another 15 connections upon loading, without deleting the previous ones. As a result, after several restarts, the connection pool ends.
I know it's not recommended to restart the server with /reload, but I think duplicating connections is wrong behavior (besides, when developing a server, it's not very convenient to constantly restart it)

Spigot version
Paper 1.18.2

Plugin version
Build ID 722

How to reproduce
"/reload confirm" multiple times, using mysql

Crash reports (if available)

@ComputerNerd100 ComputerNerd100 self-assigned this Apr 16, 2022
@ComputerNerd100 ComputerNerd100 added the BUG Something isn't working label Apr 16, 2022
@ComputerNerd100
Copy link
Collaborator

Thanks for the report.
As you identified, using /reload is of course, not recommended - for reasons exactly like this.
However, I do appreciate that ideally we shouldn't be leaving these connections open. I'll review this and get something into the disable hook to kill off the connection pool, but for now the official advice is to not use /reload.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants