-
Notifications
You must be signed in to change notification settings - Fork 44
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
mobc completely stops serving connections. #63
Comments
hi @importcjj have you had a chance to look at this issue. Any ideas or suggestions I can look at? |
I've been diving into this a bit more and I now understand why Mobc can reach a point of dropping connections and deadlocking. The issue is happening over here https://github.com/importcjj/mobc/blob/master/src/lib.rs#L664 However, when there are a large number of Receivers that have been dropped, this doesn't seem to work and the connection gets accidentally dropped. The I have an idea to solve this. But it would involve replacing the channels with a The reason the move to a |
To conclude this in case someone else comes across this. We are hosting a forked Mobc with fixes for this issue over here https://github.com/prisma/mobc |
Hello, We are experiencing exactly same issues on Prisma connection pool. The application is a backend api developed with NestJS. Could someone please explain how to implemented this fix with mobc please ? Thanks. |
@w8ze-devel can you open a ticket on the prisma repository to track this. |
The latest 0.8.1 release fixes this. |
Hey,
we use mobc as part of Prisma and we getting into a situation where mobc complete stops serving any connections.
If I create a HTTP server using hyper and create a mobc pool via Quaint.
A repo with the reproduction can be found here https://github.com/garrensmith/mobc-error-example
I then use apache benchmark with a request like this:
Once apache benchmark has stopped. The connections in postgres go to either to a much lower than the original number of connections I've set to open or completely to zero. If I log
State
from Mobc it will report it has 10 active connections. Which is incorrect.However if I try and start apache benchmark and run it again, it will either run a lot slower and with fewer connections. Or not run at all because it cannot acquire a new connection from mobc.
I've tried a few things in the code but I cannot see why this is happening. I even tried #60 but that didn't fix it.
Any help would be really appreciated.
The text was updated successfully, but these errors were encountered: