I have an old Java application working on java 1.6 on Tomcat 6. Due to way how it is set up in the environment, it is hard to do any inner diagnostics - basically I can't touch it so - it is a blackbox.
The app is crashing due to lack of free connections. The limits are set high (max 255 parallel connections) but, even if the number of open connections is like 60, it is still crashing.
Netstat shows that there are a lot of data in recvQ (just an example):
tcp 1464 0 localhost:7076 remote-host1:3120 ESTABLISHED
tcp 2512 0 localhost:7611 remote-host2:3120 ESTABLISHED
tcp 6184 0 localhost:4825 remote-host3:3120 ESTABLISHED
I couldn't find any useful hints about the case (similar issue is here: https://serverfault.com/questions/672730/no-connection-available-in-pool-netstat-recvq-shows-high-number).
The questions:
1) Why the application is not reading all the data received?
2) Because all the data is not read, another connection is opened to the DB. Am I right?
Any ideas will be appreciated.