In Oracle 19c, the classic Dead Connection Detection (DCD) mechanism, configured via expire_time in sqlnet.ora , remains the most reliable way to solve this.
One of the most frustrating issues for any DBA or application owner is the dreaded — a database connection that appears active but is actually dead due to a network failure, firewall timeout, or client crash. expire_time sqlnet.ora 19c
Fatal NI connect error 12170. Client connection timed out. In Oracle 19c, the classic Dead Connection Detection
Or for a clean start: