Limiting inactive connections

Sybase IQ uses two parameters, -tl and -ti, to determine when it should close user connections.

Setting the default network timeout

A liveness packet is sent periodically across a client/server TCP/IP communications protocol to confirm that a connection is intact. If the server runs for a liveness timeout period (default 2 minutes) without detecting a liveness packet, the communication is severed. The server drops any connections associated with that client. There is no warning. All activity that falls within any open transaction is rolled back.

The –tl switch on the server sets the liveness timeout, in seconds, for all clients that do not specify a –tl switch when they connect. Liveness packets are sent at an interval of the (liveness timeout)/4.

You may want to set a higher value for this switch at the server level. Many users, especially those who have used earlier versions of Sybase IQ, will not expect to be disconnected after only 2 minutes of inactivity.

Try setting the liveness timeout to 300, together with the recommended value for –ti discussed in the next section. Set this switch as follows:

-tl 300

If this value does not work well, try -tl 1200, which sets the liveness timeout to 20 minutes.

NoteUsers who are running a client and server on the same machine do not experience a liveness timeout.

Setting the default client timeout

Sybase IQ disconnects client connections that have not submitted a request for the number of minutes you specify with the -ti switch. By disconnecting inactive connections, this option frees any locks those connections hold. The start_iq default is 4400 (about 72 hours), which lets you start long runs at the beginning of a weekend, for example, and ensure that any interim results will not be rolled back.

For more information, see the -ti server command-line option in Chapter 1, “Running the Database Server” in the Utility Guide.