If users are using Spire Desktop and are connected to Spire Server over a VPN and are noticing that after a period of inactivity that they are disconnected from the database more frequently than they would be if they were not connected over the VPN, then it may be necessary to adjust the tcp keepalive interval to a value that is lower than the default in the postgresql configuration file.


To set the value of tcp_keepalives_idle manually, perform the following steps:


  1. Edit C:\ProgramData\Spire\PostgreSQL\10\postgresql.conf on the server.

  2. Find the line that shows this setting:  

    #tcp_keepalives_idle = 0

  3. Change it to read instead

    tcp_keepalives_idle = 120 

    **Make sure that you remove the # character from the beginning of the line

  4. Restart the Spire-PostgreSQL service.

* Additional information on the tcp_keepalives_idle setting in postgresql.conf

https://postgresqlco.nf/doc/en/param/tcp_keepalives_idle/