My Oracle Support Banner

How to Set a Connection Timeout When Using UTL_HTTP (or UTL_SMTP) (Doc ID 760664.1)

Last updated on FEBRUARY 03, 2022

Applies to:

PL/SQL - Version and later
Information in this document applies to any platform.


You are using UTL_HTTP to call a web service.  If the web service is down it may take approximately 4-8 minutes for control to return back to the PL/SQL program with a timed out response.  You want to know if there is a way to reduce the connection timeout when calling a web service using the Oracle Supplied Package UTL_HTTP.

NOTE:  UTL_HTTP contains a procedure called SET_TRANSFER_TIMEOUT.  While this may appear to be a way to set a connection timeout a closer look at the documentation explains that this procedure is for subsequent HTTP request-responses over that same connection once you have successfully established a connection to the web service.  So, this does not satisfy our need to set a timeout for the initial connection to the web service.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.