The Wayback Machine - https://web.archive.org/web/20201101091910/https://github.com/mysqljs/mysql/issues/2414
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

Error invoking quit and not ending connection. #2414

Open
otkashix opened this issue Sep 30, 2020 · 1 comment
Open

Error invoking quit and not ending connection. #2414

otkashix opened this issue Sep 30, 2020 · 1 comment

Comments

@otkashix
Copy link

@otkashix otkashix commented Sep 30, 2020

I'm using this package for a Discord Bot. The things is if I use a query inside a query, but a connection.end() is out of the first query, the code will stop and will give me this error: "Error: Cannot enqueue Query after invoking quit.". This happen if there are results. If there are not results, will not give the error but, instead, will not close the connection to the database, ending with another error after a lot of time of: too many connections.

Code: https://pastebin.com/Bc8yDC0Z
Error picture: https://imgur.com/uNoo4Z2

@mbaumgartl
Copy link

@mbaumgartl mbaumgartl commented Oct 2, 2020

The code doesn't work the way you might think. You should definitely learn what asynchronous code is and how it works.

Hint: the problem is not in this package 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.