INFORMIXCONTIME environment variable
The INFORMIXCONTIME environment variable specifies the number of seconds the CONNECT statement attempts to establish a connection to a database server before returning an error. If you set no value, the default of 60 seconds can typically support a few hundred concurrent client connections. However, some systems might encounter few connection errors with a value as low as 15. The total distance between nodes, hardware speed, the volume of traffic, and the concurrency level of the network can all affect what value you should set to optimize INFORMIXCONTIME.
- seconds
- Represents the minimum number of seconds spent in attempts to establish a connection to a database server.
60
seconds:
setenv INFORMIXCONTIME 60
If INFORMIXCONTIME is
set to 60
and INFORMIXCONRETRY is
set to 3
, attempts to connect to the database server
(after the initial attempt at 0
seconds) are made
at 20
, 40
, and 60
seconds,
if necessary, before aborting. This 20-second interval is the result
of INFORMIXCONTIME divided by INFORMIXCONRETRY.
If you set the INFORMIXCONTIME value to zero,
the database server automatically uses the default value of 60 seconds.
- All appropriate servers in the DBPATH setting are accessed at least once, even if the INFORMIXCONTIME value is exceeded. Thus, the CONNECT statement might take longer than the INFORMIXCONTIME time limit to return an error that indicates connection failure or that the database was not found.
- The INFORMIXCONTIME value is divided among
the number of database server entries that are specified in DBPATH.
Thus, if DBPATH contains numerous servers, increase
the INFORMIXCONTIME value accordingly. For example,
if DBPATH contains three entries, to spend at
least
30
seconds attempting each connection, set INFORMIXCONTIME to90
.
Order of precedence among INFORMIXCONTIME settings
When you specify a setting for the INFORMIXCONTIME client environment variable, it overrides the INFORMIXCONTIME configuration parameter settings in the onconfig file for the current session.
If the SET ENVIRONMENT statement specifies a setting for the INFORMIXCONRETRY session environment option, however, the SQL statement setting overrides the INFORMIXCONRETRY client environment variable setting for subsequent connection attempts during the current session. The SET ENVIRONMENT INFORMIXCONRETRY setting has no effect on other sessions.
In summary, this is the ascending order (lowest to highest) of the methods for setting an upper limit on the amount of time that a CONNECT statement can spend attempting to connect to a database server:
- INFORMIXCONTIME configuration parameter
- INFORMIXCONTIME client environment variable
- SET ENVIRONMENT INFORMIXCONTIME statement of SQL.
INFORMIXCONTIME takes precedence over the INFORMIXCONRETRY setting. Connection attempts can end after the INFORMIXCONTIME value is exceeded, but before the INFORMIXCONRETRY value is reached.