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.

The INFORMIXCONTIME and INFORMIXCONRETRY environment variables let you configure your client-side connection capability to retry the connection instead of returning a -908 error.

1  setenv INFORMIXCONTIME seconds
seconds
Represents the minimum number of seconds spent in attempts to establish a connection to a database server.
For example, enter this command to set INFORMIXCONTIME to 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.

If the CONNECT statement must search DBPATH, the INFORMIXCONRETRY setting specifies the number of additional connection attempts that can be made for each database server entry in DBPATH.
  • 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 to 90.
The INFORMIXCONTIME and INFORMIXCONRETRY environment variables can be modified with the onutil SET command, as in the following example:
% onutil
1> SET INFORMIXCONTIME 120;
Dynamic Configuration completed successfully
2> SET INFORMIXCONRETRY 10;
Dynamic Configuration completed successfully

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.