I have a JBoss app server and a Postgres database server on different machines. I'm troubleshooting TCP connections between them (because the app keeps running out of database connections).

I'm seeing this and it makes no sense:

  • When I do a netstat on the database server, I see lots of established TCP connections from my app server.
  • When I do a netstat on the app server, I see almost no established TCP connections to the database server.

The machines are VMware virtual machines running Centos, managed by a cloud provider (not AWS). There's no firewall between the machines (as per Too many established connections left open) which does seem like similar behaviour.

I don't know what else could cause this asymmetry?


Very strange. Seems like a the app server just doesn't receives FINs and someone else answering them, it may be a problem on your cloud provider. However, you still can try a workaround for this problem and close old connections once in a while. See Is there a timeout for idle PostgreSQL connections? for more informations about how to do it.

  • Thanks for this, that does look like a good workaround. After further investigation, it's looking like this is indeed a problem at the cloud provider end. The probable cause is a firewall-type issue related to their VMware configuration, which fits with the observed behaviour. – David Carboni Sep 6 '16 at 15:17

For the benefit of anyone else seeing this behaviour, it was confirmed as a problem with the VMware setup at the cloud provider end, as suggested @Shmuel Hazan.

If I've understood correctly, this was a problem with the VShield edge, which is why the observed behaviour matched that of a firewall cutting off the connection.

Once the provider rectified the fault, normal service was restored.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.