Your understanding of a closed connection is correct. Reason for a closed connection: External devices such as a firewall, network devices, and remote database users can cause network connections to close after a period of inactivity
ReadTimeOut will happen even with active connections. If the request or procedure takes a long time, you will get a read timeout exception.
- Closed connection: shutting down the database listener when starting the database
- ReadTimedOut: add sleep mode to the procedure for more than 10 minutes and call this procedure from the application
Replication of Socket Read Timeout Error in Oracle DB env:
Since the procedure does not return from 120 seconds due to hibernation for 125 seconds, java will call the socket timeout in the above scenario.
source share