We have a 3 tier architecture application wherein there is a recent surge in the number of inactive sessions in the database. We are using oracle database and weblogic application server. We have 'n' number of processes running in the server, which connect to the database for reads and writes.
After spending lot of ways to narrow down the cause of the connection leaks, I stumbled upon the ss command in linux to catch the culprit that is causing connection leaks. The idea is that if I could somehow know the process that is causing this, I can fix the connection leaks in the code. Below is the command I invoked at regular intervals
ss -a | sort -k6 | grep 1521 > output.log
My question is, is this the best way to figure out the root cause of the connection leaks, or is there a better way?