-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Added pool.end() #912
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
Added pool.end() #912
Conversation
Thank you so much! |
You're welcome, Doug. |
When you are done using the pool, you have to end all the connections or your | ||
script will hang until the db server closes them. To end all the connections | ||
in the pool, use | ||
[pool.end()](https://github.com/felixge/node-mysql/blob/master/lib/Pool.js#L121) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This link is damned to go wrong fast when thing changes. It probably is already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. Do you have a proposed / usual way of dealing with this?
Dan Bernardic
My contact information is at http://gravatar.com/dbernar1
On Sep 29, 2014, at 5:43 AM, Christian Tellnes notifications@github.com wrote:
In Readme.md:
@@ -320,6 +320,22 @@ being taken from the top of the pool and returning to the bottom.
When a previous connection is retrieved from the pool, a ping packet is sent
to the server to check if the connection is still good.+## Terminating all the connections in a pool
+
+When you are done using the pool, you have to end all the connections or your
+script will hang until the db server closes them. To end all the connections
+in the pool, use
+pool.end()
This link is damned to go wrong fast when thing changes. It probably is already.—
Reply to this email directly or view it on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link to a specific version of the code instead of a branch. Eg. a commit or a tag. (just change master
in the url to something else)
But do we really need to link to the implementation here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much for the tip. I was just looking at adjusting it, and it looks like Doug edited the commit before merging it. He seems to have removed the link and adjusted the wording somewhat.
See dc0d600
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, my bad. I should have checked the merged commit before commenting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not at all. Thanks for checking and the tip.
Believe it or not, I had wondered about a solution to going out of date, in context of the WordPress codex, so I am glad you told me.
Dan Bernardic
My contact information is at http://gravatar.com/dbernar1
On Sep 29, 2014, at 6:37 AM, Christian Tellnes notifications@github.com wrote:
In Readme.md:
@@ -320,6 +320,22 @@ being taken from the top of the pool and returning to the bottom.
When a previous connection is retrieved from the pool, a ping packet is sent
to the server to check if the connection is still good.+## Terminating all the connections in a pool
+
+When you are done using the pool, you have to end all the connections or your
+script will hang until the db server closes them. To end all the connections
+in the pool, use
+pool.end()
Sorry, my bad. I should have checked the merged commit before commenting.—
Reply to this email directly or view it on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, I removed the link because, really, it's not that useful to link into the source anyway :)
closes mysqljs#911 closes mysqljs#912
As brought up in #911
Please let me know if you would like me to adjust...