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

setting to disconnect at end of request by default? #52

Open
msouth opened this issue Mar 5, 2014 · 1 comment
Open

setting to disconnect at end of request by default? #52

msouth opened this issue Mar 5, 2014 · 1 comment
Labels

Comments

@msouth
Copy link

msouth commented Mar 5, 2014

I just encountered an issue with an app going into production that had not been sufficiently volume tested. The starman workers were holding their database connections open and exceeded the max number of connections in mysql.

For mysql, in particular, there are people that recommend just reconnecting every time because connections are cheap. It might be nice to have a setting that would call disconnect at the end of a request.

possibly (peripherally) related to #10

@bigpresh
Copy link
Owner

Firstly, sorry this received no attention for so long

Hmm - in general I'd say the fix is to increase the number of connections to mysql rather than having your app connect and disconnect for every HTTP request - I believe you'll find much better performance.

However - it shouldn't be that difficult to provide a setting that causes an after hook to disconnect the connection, I'd say.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants