Database connection doesn't close after command #1407
Answered
by
thetutlage
backspacerhino
asked this question in
Help
-
Given the next code for command:
The command never finished if we have any Database connection opened. |
Beta Was this translation helpful? Give feedback.
Answered by
thetutlage
Aug 7, 2020
Replies: 1 comment 2 replies
-
Expected. You have to close the database connection manually. AdonisJS cannot make the decision whether to forcefully close the connection or not. What if your command intentionally is a long running process? await this.db.manager.closeAll() |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
backspacerhino
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected. You have to close the database connection manually. AdonisJS cannot make the decision whether to forcefully close the connection or not. What if your command intentionally is a long running process?