Comments (4)
Sounds good to me :) Setting the connect strategy to lazy allows workers to (re-) start more quickly and reliably, and works around poolboy's annoying deficiency to crash an entire pool if one worker fails to (re-) start, too.
One ugliness that remains is that part of it (the idle timeout) depends on the server, ie there is no way for the client to decide that it wants to be extra nice and close the connection when it has not been used for a while (maybe even to just close and revert to the not-connected state of lazy mode).
from mysql-otp-poolboy.
@getong, @juhlig, other users, what's your opinion on this?
from mysql-otp-poolboy.
and works around poolboy's annoying deficiency to crash an entire pool if one worker fails to (re-) start, too
Yes, I didn't even think about this. It's an extra benefit.
maybe even to just close and revert to the not-connected state of lazy mode
Hm... Then we lose the connection state, but as a non-default option with an explicit warning, perhaps yes. Anyway, with just the server disconnecting after 8 hours idle, the application will come to some balance of how many connections it needs within 24 hours.
from mysql-otp-poolboy.
and works around poolboy's annoying deficiency to crash an entire pool if one worker fails to (re-) start, too
Yes, I didn't even think about this. It's an extra benefit.
Oh, plus it has the benefit that workers will always start quickly. With poolboy, worker starts happen synchronously, blocking all other pool operations, so quick worker starts are good :)
maybe even to just close and revert to the not-connected state of lazy mode
Hm... Then we lose the connection state, but as a non-default option with an explicit warning, perhaps yes.
Just a thought, I think not really worth it.
Anyway, with just the server disconnecting after 8 hours idle, the application will come to some balance of how many connections it needs within 24 hours.
I guess so :) In any case, I think that this would be a good improvement, so I'm in favor of it :)
from mysql-otp-poolboy.
Related Issues (15)
- Look into the changes of poolboy 1.5.X HOT 3
- last_insert_id ? HOT 2
- Bump deps MySQL/OTP 1.1.1 HOT 1
- Not prepared error HOT 1
- Restarting the mysql server is not detected by the driver. HOT 24
- Closed connection is not detected HOT 1
- rebar.config and Makefile mysql-otp mismatch HOT 2
- Function name "checkout_connection" is too long HOT 1
- could you update rebar.config to point to the latest mysql-otp ? HOT 6
- Add this to Hex? HOT 1
- I get the tcp_closed every day HOT 6
- with/2 for checkout-Fun()-checkin without SQL transaction HOT 1
- execute/3,4 for prepared statements HOT 2
- Rename add_pool OR change what it does HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mysql-otp-poolboy.