-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Postgres broken pipe regression #2312
Comments
Is it my DSN? |
I have tried adding |
I checked, since using pop we are still using pgx but the version is newer. I'm not sure if that makes the difference though. |
Just to follow up here, adding It is interesting that even though pop uses pgx this started happening again. Anyway i'll leave the fix here and im going to close. |
@vinckr can we document this in ory/docs? |
Sure! You mean in the Hydra docs right? |
No, somewhere here: https://www.ory.sh/docs/ecosystem/deployment Maybe under best practices? |
I think this should be reopened until the issue is fixed by default. #1599 (comment) argued not to add |
The issue is fixed per default, if your network is flaky, or PostgreSQL configured to close connections (see linked comment), then you need to adjust your connection string. Setting an arbitrary default value here will probably not solve network issues as you need to choose the correct values for your environment. We assume a stable connection per default. If your connection is not stable, you need to adjust your settings to improve connection reliability, but you need to do so in a way that reflects your network topology. We can not guess that for you! |
Today I had the same problem with broken pipes. I use hydra v1.9 using PostgreSQL 12 (deployed using Zalando postgres-operator), both running on the same bare-metal Kubernetes cluster. Our network is nothing special: 3 nodes, connected on L2, no overlay network. |
What is the rational behind the connection timeout of 20s? is it arbitrary? |
Was there ever a resolution on this, in testing we are still seeing these types of issues. The first couple of connections after an idle period are returning as errors |
@process-pca, did you see the maintainers response here ? |
Describe the bug
I think the bug described here #1599 and fixed by moving to https://github.com/jackc/pgx is back. After upgrading to
v1.9
we have started seeing a lot of broken pipe errors. This could be due to the move to https://github.com/gobuffalo/pop ?Reproducing the bug
Steps to reproduce the behavior:
/oauth2/auth/requests/login
with the login challengeThe error is unrecognizable StatusCode:0
, underlying error iswrite: broken pipe
Server logs
Server configuration
Expected behavior
In
v1.8
we did not have any broken pipes. Prior to that prejackc/pgx
we experienced the broken pipe errors.Environment
The text was updated successfully, but these errors were encountered: