Choose Timeout Connection Attributes for Your Client
Performance impact: Variable
TTC_Timeout attribute
determines the maximum number of seconds a client application waits for the result from
the corresponding server process before timing out.
If you are using multiple servers for automatic client failover, then you can set the
TTC_ConnectTimeout attribute to specify the maximum number of
seconds the client waits for a SQLDriverConnect or
SQLDisconnect request. It overrides the value of
TTC_Timeout for those requests. Set the
TTC_ConnectTimeout when you want connection requests to timeout
with a different timeframe than the timeout provided for query requests. For example,
you can set a longer timeout for connections if you know that it takes a longer time to
connect, but set a shorter timeout for all other queries.
The overall elapsed time allotted for the SQLDriverConnect call depends on if automatic client failover is configured:
-
If there is just one
TTC_SERVERnconnection attribute defined, then there is no automatic client failover configured and the overall elapsed time allotted for the initial connection attempt is limited to 10 seconds. -
If automatic client failover is defined and there is more than one
TTC_SERVERnconnection attribute configured, then the overall elapsed time is four times the value of the timeout (whetherTTC_TimeoutorTTC_ConnectTimeout). For example, if the user specifiesTTC_TIMEOUT=10 and there are multipleTTC_SERVERnservers configured, then theSQLDriverConnectcall could take up to 40 seconds.
However, within this overall elapsed timeout, each connection attempt can take the time specified by the TTC_Timeout or TTC_ConnectTimeout value, where the TTC_ConnectTimeout value overrides the TTC_Timeout value.
See Choose SQL and PL/SQL Timeout Values for information about how TTC_Timeout
and TTC_ConnectTimeout relates to SQL and PL/SQL timeouts.
See TTC_Timeout and TTC_ConnectTimeout in the Oracle TimesTen In-Memory Database Reference.