You get a connection timeout, not a transmission timeout. It is raised from BEGIN_REQUEST , not GET_RESPONSE ; it doesn’t get to transfer anything, it just tries to open a connection to the remote host and port. If you have a connection and a GET or POST whose request / response has exceeded 2 seconds, you will see UTL_HTTP.transfer_timeout . But you see a transport layer problem, not an HTTP request problem.
You can catch the "HTTP Failure" part, but not specifically the TNS timeout, since it is being processed by UTL_HTTP:
DECLARE ... http_failure exception; pragma exception_init(http_failure, -29273); BEGIN ... EXCEPTION WHEN UTL_HTTP.transfer_timeout THEN DBMS_OUTPUT.put_line ('Transfer timeout'); WHEN http_failure THEN DBMS_OUTPUT.put_line ('HTTP failure - timeout?'); RAISE; END;
You can pop into the exception stack when you see this and choose more specific errors, but it’s not clear what you want to do with the specific reason. Presumably, you really do not want to catch all this, you are just debugging the exception, because the timeout that you set does not work ...
I do not know how to change the length of this timeout. Since this is from TNS, it seems sqlnet.outbound_connect_timeout should affect sqlnet.outbound_connect_timeout , but you set it to sqlnet.ora and the server does not seem to notice this in this scenario. It can use the default operating system settings.
source share