Specify a timeout

You can specify a timeout value for the proxy by using the PROXYTIMEOUT keyword. The PROXYTIMEOUT value specifies how often the client-side JDBC driver sends a keepalive request to the proxy. A PROXYTIMEOUT value is represented in seconds; the value can be 60 or greater.

When PROXYTIMEOUT is specified by the client, the proxy sets the clients session expiration equal to 2 x PROXYTIMEOUT. For example, if PROXYTIMEOUT is set to 60 seconds, the proxy sets the clients expiration time to 120 seconds. When the expiration time is reached, the proxy removes the clients session resources and closes its database connection.

The proxy resets the timeout interval each time a communication is received from the client. Here are some valid values for PROXYTIMEOUT:
PROXYTIMEOUT=-1
Disables the client timeout feature.
PROXYTIMEOUT=nnn
Client sends a keepalive request to proxy every nnn seconds. The nnn value must be 60 or greater.
PROXYTIMEOUT=60
Default value if PROXYTIMEOUT is not specified
The proxy timeout feature is helpful in determining if a client session has terminated without first sending the proxy a close request by closing the JDBC connection. The proxy maintains an open database connection on behalf of the client until the client either:
  • Explicitly closes the database connection
  • Exceeds its timeout interval

The onstat database utility shows an open session for any client sessions that have unexpectedly terminated and have set PROXYTIMEOUT to -1.

Here is an example that specifies PROXYTIMEOUT:
jdbc:informix-sqli://123.45.67.89:1533:informixserver=myserver;
   user=rdtest;password=test;
   PROXY=webserver:1462?PROXYTIMEOUT=180;

See the demo/proxy directory under the directory where your driver is installed for an example applet and application that uses the proxy.