Oracle database version 18.104.22.168
Java version – Openjdk version 1.8.0_222
Web user reported getting an intermittent connection reset error from the web application. Web error shows the following:
Connection reset, at oracle.jdbc.driver.SQLStateMapping.newSQLException
The database is Oracle 12c and the following is logged in the database alertXXXX.log file:
WARNING: inbound connection timed out (ORA-3136)
After a lot of testing and investigation, it turned out that the issue is related to the Linux web server’s random number generator. Oracle needs a random number generated to keep its connection open. The headless Linux web server was not generating the random number fast enough and that caused the connection to be closed between Java and Oracle.
The easiest solution is to add this parameter to the java launch command:
Another solution is to update the java.security file and change the “securerandom.source” parameter to “/dev/urandom”.
This link gives a detailed explanation of the problem: