SQL*Net - Connection Timeout

From: Moore, Paul <Paul.Moore_at_atosorigin.com>
Date: Fri, 29 Feb 2008 16:16:20 -0000
Message-ID: <3CF9EBFD312E1646A8597D477173352701E897FD@UKCWRX003.uk.int.atosorigin.com>

I have a problem with a remote database, where any attempt to connect to that database from one particular client hangs indefinitely (more precisely, for longer than I have been willing to wait to see if it's actually "hours" rather than "forever" :-)) The inability to connect from this particular client isn't a major problem, but having jobs which attempt to connect hang indefinitely rather than fail with a TNS timeout error is.

I have looked through the SQL*Net reference, and asked colleagues, but I cannot find any way of setting a parameter to say that the client (OCI, actually Python with cx_Oracle) connection should timeout after XXX seconds, regardless. Is there such a setting anywhere?

The connection attempt is part of a long-running process, so I cannot simply kill the hung process. Running the connection in a thread and giving up waiting after a timeout sort of works, but the thread stays there, hung, and as time goes on the process accumulates hung threads. I'd really, really like to avoid having to re-engineer my process to spawn subprocesses for each connection (especially as this is on Windows where spawning subprocesses is a bit of a pain compared to using threads).

Has anyone got any suggestions?


Paul Moore
Oracle DBA Support
Atos Origin UK Ltd
Daresbury Court

Tel: +44 (0)1928 598537

Atos Origin and Atos Consulting are trading names used by the Atos Origin group. The following trading entities are registered in England and Wales: Atos Origin IT Services UK Limited (registered number 01245534) and Atos Consulting Limited (registered number 04312380). The registered office for each is at 4 Triton Square, Regents Place, London, NW1 3HG.

This e-mail and the documents attached are confidential and intended solely for the addressee, and may contain confidential or privileged information. If you receive this e-mail in error, you are not authorised to copy, disclose, use or retain it. Please notify the sender immediately and delete this email from your systems. As emails may be intercepted, amended or lost, they are not secure. Atos Origin therefore can accept no liability for any errors or their content. Although Atos Origin endeavours to maintain a virus-free network, we do not warrant that this transmission is virus-free and can accept no liability for any damages resulting from any virus transmitted. The risks are deemed to be accepted by everyone who communicates with Atos Origin by email.

Received on Fri Feb 29 2008 - 10:16:20 CST

Original text of this message