We get this error in the logfile...

pq_recvbuf: recv() failed: Connection reset by peer
The result is that the web page does not display the intented contents.

What I found out was..

The application server (Jboss) is running on 192.168.64.x network, while PostgreSQL is running on 192.168.66.x network. This is suspected to be the cause of the error owing to a 'timeout' in the gateway for 192.168.64.x network.

In a scenario where both JBoss & PostgreSQL are on
192.168.66.x network, we are not getting this error.

Any other issues to look into for this error?

Your input is highly appreciated.