We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
After the connection idles for few hours, the first few request fails with TCP error:
write tcp 192.168.3.4:65383->3.1.14.XXX:5432: write: broken pipe
This is the code i'm using on startup of my application:
dsn := fmt.Sprintf("postgres://%v:%s@%v:5432/%v?sslmode=disable", dbconfig.Get("dbuser").(string), url.QueryEscape(dbconfig.Get("dbpass").(string)), dbconfig.Get("dbhost").(string), dbconfig.Get("dbname").(string)) sqldb := sql.OpenDB(pgdriver.NewConnector(pgdriver.WithDSN(dsn))) if err != nil { log.Fatal(err) } err = sqldb.Ping() if err != nil { log.Fatal(err) } db := bun.NewDB(sqldb, pgdialect.New()) db.AddQueryHook(bundebug.NewQueryHook(bundebug.WithVerbose()))
I didn't have that issue with lib/pq driver before.
The text was updated successfully, but these errors were encountered:
The fix should be similar to this: lib/pq#1013
Sorry, something went wrong.
Thanks for bringing this 👍
Successfully merging a pull request may close this issue.
After the connection idles for few hours, the first few request fails with TCP error:
write tcp 192.168.3.4:65383->3.1.14.XXX:5432: write: broken pipe
This is the code i'm using on startup of my application:
I didn't have that issue with lib/pq driver before.
The text was updated successfully, but these errors were encountered: