Keep-alive connections parameters#
PostgreSQL® keep-alive connection parameters are useful to manage Idle connections. The following is a reference to the default Aiven for PostgreSQL® parameters on the server side, and what keep-alive parameters can be used at the client side.
Keep-alive server side parameters#
Currently, the following default keep-alive timeouts are used on the server-side:
Parameter (server) |
Value |
Description |
---|---|---|
|
180 |
Specifies the amount of time with no network activity after which the
operating system should send a TCP |
|
6 |
Specifies the number of TCP |
|
10 |
Specifies the amount of time after which a TCP |
Keep-alive client side parameters#
The client-side keep-alive parameters can be set to whatever values you want.
Parameter (client) |
Description |
---|---|
|
Controls whether client-side TCP |
|
Controls the number of seconds of inactivity after which TCP should
send a |
|
Controls the number of TCP |
|
Controls the number of seconds after which a TCP |
Even though TCP connections usually stay open for extended periods of time, you should also make sure that your applications can reconnect, since TCP connections are liable to break at times. Also, when reconnecting you should make sure that your client always resolves the DNS address on connection, since the underlying address will change during automatic failover when a primary node fails.