-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
The conneciton pool returns corrupt connections #139
Comments
Thanks for opening this bug report. I think I would accept a PR that just changes the built-in ping function to your first variant. That should hopefully workaround that issue. Otherwise I would be interested in having a minimal reproducible example for this, as otherwise this is impossible to debug for anyone. diesel_async/src/pooled_connection/mod.rs Line 330 in 1ef43d2
For now you can also workaround that issue by providing your custom connection check function via this config. |
Changing the built-in ping function to my first variant is not easy, since it requires the backend to support the integer type |
We can assume support for |
Setup
Versions
Feature Flags
Problem Description
After running for a few days, some connections in the connection pool will return an error
What are you trying to accomplish?
Query records in the database
What is the expected output?
No error
What is the actual output?
Got an error: "Unexpected end of row"
Are you seeing any additional errors?
Input/output error: can't parse: buf doesn't have enough data
Steps to reproduce
It's hard to reproduce the problem, after running for a few days, some connections in the pool will return errors. I think those connections are already corrupt but still can pass the health check of the connection pool. So I did a contrast experiment, when I found the connection got corrupt, the
ping2
responded with ok, but theping
responded with an error "buf doesn't have enough data"Checklist
closed if this is not the case)
The text was updated successfully, but these errors were encountered: