I'm monitoring my PostgreSQL clients using a periodic
netstat -an | grep 5432 | grep EST to check the
ESTABLISHED status of the connection every 5 minutes. I have noticed that all of the connections become
TIME_WAIT after around minutes, and then a new connection is re-opened (the client port changes), forming a new
ESTABLISHED connection. This behavior persists regardless of the status or activity of the postgres client.
Any thoughts on what might be causing this recurring reconnection on the clients? I've tried setting the
tcp_keepalives_idle to no avail.