Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle.ManagedDataAccess.Client.OracleException (0x80004005): Connection request timed out

user12203852Aug 14 2020 — edited Aug 14 2020

Hi,

Environment
Oracle.ManagedDataAccess - 19.8.0
.NET framework - 4.6.1
Oracle database - 12.2.0.2 Standard Edition, running on Oracle Linux
Firewall exists between Windows servers and Oracle Database with TCP Idle session timeout set to 30 Min and
UDP idle session timeout set to 1 Min.

With above, we have cluster of IIS Servers connecting to the database. We are experiencing intermittent timeout errors i.e. Oracle.ManagedDataAccess.Client.OracleException (0x80004005): Connection request timed out.

To fix this, we have set "Validate connection=true" in the connection string. However Oracle's documentation prefers creating event handler over setting this attribute,

The Validate Connection attribute validates connections coming out of the pool. This attribute should be used only when absolutely necessary, because it causes a round-trip to the database to validate each connection immediately before it is provided to the application. If invalid connections are uncommon, developers can create their own event handler to retrieve and validate a new connection, rather than using the Validate Connection attribute. This generally provides better performance.

Is their a sample of this event handler available?

This post has been answered by Alex Keh-Oracle on Aug 14 2020
Jump to Answer

Comments

Post Details

Added on Aug 14 2020
1 comment
54,063 views