-
Notifications
You must be signed in to change notification settings - Fork 108
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
Consider releasing connections bound to a feed #135
Comments
I'm having significant problems due to "too many connections" and changefeeds with my production application (https://cloud.sagemath.com). I would thus be willing to test anything along these lines that gets done, or maybe even write something. My current plan has been to either modify rethinkdbdash to re-use connections (for multiple queries), or to not use rethinkdbdash, or to change my application to reduce the number of changefeeds I use. Anyways, I'm willing to stress test things. |
@williamstein -- I would have a few questions for you:
So I can think of two ways to release the connections:
One more solution for your problem @williamstein maybe would be to provide another pool for feeds where connection will be reused? Or keep X connections per pool reserved for feeds? |
Actually a simple linked list should do the trick. |
I finished replacing the circular buffer with a linked list. Tests are passing with and without the new argument. Install (branch
Use
Under the hood It's not released yet, I want to check a few things first (typically edge cases and stuff). But @williamstein (or anyone else) if you want to give it a go, feel free to. |
It seems like an old issue. Is it resolved already (or planned to be)? I'm encountering a similar issue (might be my own leaky code that does not close some cursors but still) |
Hum, I created a branch a long time ago and it was working, but there wasn't a strong need for this, and I think I eventually did not merge it (it's still in the linkedlist branch though) |
Hi, |
I've rebased the linkedList branch on top of the latest master in #374, and all tests (apart from two backtrace formatting changes) are passing. |
Since the v4 protocol, the main reason to force a feed to be the only query on a connection is gone. It should be relatively safe[1] to run a query and a feed on the same connection
We could add an option to release the connection bound to a feed.
[1] benchmark needed
The text was updated successfully, but these errors were encountered: