2

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?

David Carboni
  • 181
  • 1
  • 4

2 Answers2

1

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.

473183469
  • 1,350
  • 1
  • 12
  • 23
Shmuel H.
  • 141
  • 4
  • 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 06 '16 at 15:17
0

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.

David Carboni
  • 181
  • 1
  • 4