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

Connection leak #6

Closed
Esmaay opened this issue Jul 28, 2022 · 7 comments
Closed

Connection leak #6

Esmaay opened this issue Jul 28, 2022 · 7 comments

Comments

@Esmaay
Copy link

Esmaay commented Jul 28, 2022

As soon as I create 5 or more models, it will say that the connection is not available.
It will cause this error: https://haste.jazzkuh.com/utarurosij.apache, if I remove a random model, it will work again.

I thought that something might not be properly closed in the runMigrations method since it instantly errors if I have 6 or more models, if I have 5 it will give the error when I try to use the database, but it doesn't when I don't run the method.

My init method: https://haste.jazzkuh.com/uyepamurif.java

Models:

@Jazzkuh
Copy link
Contributor

Jazzkuh commented Jul 30, 2022

I have tried this first with 4 models which worked as intended for me but then when i add a fifth i get the same error, so can reproduce^^

@Jazzkuh
Copy link
Contributor

Jazzkuh commented Jul 30, 2022

Alright, just had a look through storm, and it looks to me like storm doesn't close any queries, can you confirm @Mindgamesnl? I've also tested this with HikariCP and with the maximum pool size set to 100 instead of 10, and then it works as expected, so I would assume it has something to do with queries not closing properly.

@Mindgamesnl
Copy link
Owner

I'm using normal try with resources everywhere if I recall correctly, though it his behaviour does indeed suggest a fuckup.

I'll chip in and check later tonight.

@Mindgamesnl
Copy link
Owner

I found the problem, it's related to how table metadata is loaded upon startup which in turn is used to compare schema versions.
I'll push a fix by the end of the day.

@Mindgamesnl
Copy link
Owner

If either of you could confirm that this minor change fixes it, that'd be lovely.
I ran it against a local database, and it seems to do the job.

If you're using jitpack, then just request build 1.2.6

@Esmaay
Copy link
Author

Esmaay commented Jul 30, 2022

Yes, this has fixed the issue! Thanks!

@Esmaay Esmaay closed this as completed Jul 30, 2022
@Jazzkuh
Copy link
Contributor

Jazzkuh commented Jul 30, 2022

Can confirm, works! Thank you.

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

3 participants