Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a scenario where long-idle sessions of TOADSoft client communication with the Oracle server seem to be torn down as they timeout on an intermediate state-full firewall.

These sessions could be idle for multiple hours!
It is not acceptable to increase the timeout on the firewall globally and
of course, it does not support longer timeouts for specific flows.

I have fixed this problem for PuTTY idle connections;
it allows a configurable keep-alive.

But, I have not yet identified any such support in the TOAD software.

Looking up a bit on system-wide configurations, I came up with this Microsoft TechNet detail on Configuring system wide Keep-Alives that involves working with the KeepAliveTime and related registry variables.

HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\KeepAliveTime

This seems like the Linux system wide configuration for using system wide keep-alive.
But, that requires programs to use the setsockopt() and request keep-alive (right?).

Remember that keepalive support, even if configured in the kernel, is not the default behavior in Linux. Programs must request keepalive control for their sockets using the setsockopt interface. There are relatively few programs implementing keepalive...


Questions

  1. Can I use this KeepAliveTime technique on the windows client machines or maybe the server?
    (has anyone tried it?)
  2. Is there some other way to keep these TOAD connections active (from either end of the communication)?
share|improve this question
add comment

2 Answers

Set the value of SQLNET.EXPIRE_TIME in sqlnet.ora.

Here is what the Oracle manual says on this subject:

Purpose

Use parameter SQLNET.EXPIRE_TIME to specify a the time interval, in minutes, to send a probe to verify that client/server connections are active. Setting a value greater than 0 ensures that connections are not left open indefinitely, due to an abnormal client termination. If the probe finds a terminated connection, or a connection that is no longer in use, it returns an error, causing the server process to exit. This parameter is primarily intended for the database server, which typically handles multiple connections at any one time.

Limitations on using this terminated connection detection feature are:

  • It is not allowed on bequeathed connections.
  • Though very small, a probe packet generates additional traffic that may downgrade network performance.
  • Depending on which operating system is in use, the server may need to perform additional processing to distinguish the connection probing event from other events that occur. This can also result in degraded network performance.

Default: 0

Minimum Value: 0

Recommended Value: 10

Example

SQLNET.EXPIRE_TIME=10

share|improve this answer
    
Will check this out. Thanks. –  nik Jul 21 '09 at 3:25
add comment

Do you have SSH access? You could set up an SSH tunnel & send the SQL communication over that.

TOAD: server(or tnsnames) becomes localhost, listening port is some random port such as 12346
PuTTY: port forwarding. source port: 12346, destination: $REMOTE_IP:1521. Leave it as a Local port.

Make sure you enable TCP keepalives in PuTTY via the Connection section.

share|improve this answer
    
This is an interesting idea. It could run into problems with too many long connections seen in this environment. But, I'll check it out. Thanks. –  nik Jul 21 '09 at 3:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.