1

I try to use pgBouncer to eliminate short network disconnects. I did a test, where I had Clinet->pgBouncer->Postgresql. When connection is made from Client, I disconnect network cable, if I connect it back faster than in ~15 sec it still works. If not, I am totally disconnected, and pgBouncer logs:

db/user@server.address.com:5432 closing because: server conn crashed? db/user@127.0.0.1:49837 closing because: server conn crashed? db/user@127.0.0.1:49837 Pooler Error: server conn crashed?

How I can control that timeout?

PS: In my pglib on client side, in connection string timeout is set to 60 sec.

Lukas

Yuri
  • 4,254
  • 1
  • 29
  • 46
  • When I made test network cable was disconnected between pgBouncer and Postgresql (client to pgbouncer was connected without any interruptions). – Lukas Radvilavicius Oct 22 '15 at 13:56

1 Answers1

5

I would try to adjust option server_connect_timeout. According to doc - If connection and login won’t finish in this amount of time, the connection will be closed. Default is 15 sec.

Anyway, good source for pgbouncer tuning is https://pgbouncer.github.io/config.html.

Yuri
  • 4,254
  • 1
  • 29
  • 46
Karel Jakubec
  • 342
  • 2
  • 13