-
Notifications
You must be signed in to change notification settings - Fork 6
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 connection pool #24
Conversation
a8e7c13
to
9e8f29f
Compare
9e8f29f
to
eaa905f
Compare
@mmoreram Hi Marc, we are using driftphp dbal together with RacthetPHP for the project www.mspchallenge.info. I think a connection pool would be a great addition . So what is the status of this PR ? |
Hello @marinhekman Thanks for the comment and for using the project. I'm glad seeing that the project is useful :) |
@mmoreram perfect. I will let you know within a couple of weeks |
@mmoreram I succesfullly tested with 40 connections. Basically replaced Question: how would you handle a mysql idle timeout?
Of course with a pool I would have to traverse each one these pool connections...not the best solution, and I not even sure I can traverse each connection now. Maybe there a way to just handle the "2006 MySQL server has gone away" exception and do a re-connection ? I can probably handle the exception in the rejection of the promise, but how do I tell a DriftPHP dbal connection to do a re-connection? Maybe calling connect() would work.. I will try that |
@mmoreram it would be handy to have a way to iterate over the connections in the pool. |
I did this for now: marinhekman@c4f1a40 |
Hello! Thanks for your work :) I really appreciate it. I'm thinking then. |
@marinhekman I'm mergin both your PR and mine, and will add a minor release for you to start using it on prod. If you want to explore the addition of this keep alive inside the library, that would be awesome.
|
@mmoreram thanks . I will explore the addition of keep_alive_each suggestion in my fork and let you know. |
No description provided.