-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
bump lib/pq ftom 1.2 to 1.10 #715
Conversation
I'm seeing "broken pipe" errors when working with CRDB using sqlx. The issue seemed to be the tcp connections were diconnected while the conns in db driver (pq) still has stale connection. It happens more often when the DB is behind a proxy. In our cases, the pods were proxied by the envoy sidecar. There were other instances on the community reporting similar issues, and took different workaround by sebding perodic dummy queries in app mimicing keepalive, enlenghthen proxy idle timeout, or shortening the lifetime of db conn. This has been reported and fixed by the lib/pq upstream in v1.9+ lib/pq#1013 lib/pq#723 lib/pq#897 lib/pq#870 grafana/grafana#29957
ping @jmoiron |
We are also experiencing the same broken_pipe issue. After a lot of research landed up here. |
Would also really appreciate this. It is a huge annoyance(for how simple the fix is) and leads to inaccessible apps. |
@jmoiron I would also be very grateful if this small but important fix could be merged. |
- this bump fix is based upon jmoiron#715
So I'm fairly sure that sqlx only uses the mysql, pq, and sqlite drivers for tests. So which version of pq you use in your application is down to you. I have these in my
Which becomes these in my
So you can see it has fetched the old pq but it doesn't end up in the binary:
|
I've created a fork with updated current drivers https://github.com/BenKnigge/sqly |
Hello, @ardan-bkennedy, and I recently stepped in to help maintain this project. |
I'm seeing "broken pipe" errors when working with CRDB using sqlx.
The issue seems to be the db driver conns become stale when tcp connections were disconnected.
It happens more often when the DB is behind a proxy. In our cases, the pods were proxied by the envoy sidecar.
There were other instances on the community reporting similar issues, and took different workaround by sending periodic dummy queries in app as keepalive, prolonging proxy idle timeout, or shortening the lifetime of db conns.
This has been reported and fixed in the lib/pq in v1.9+
lib/pq#1013
Other reference:
lib/pq#723
lib/pq#897
lib/pq#870
grafana/grafana#29957