Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

UTL_HTTP sometimes timeouts immediately if start is near the end of a second

mdl4 days ago

Hi,
I have a simple HTTP client in PL/SQL procedure with code like this:

UTL_HTTP.set_transfer_timeout(1); /* 1 second */
l_req := UTL_HTTP.begin_request(l_url);
l_resp := UTL_HTTP.get_response(l_req);

The problem is that if this procedure is called at a time with 950 milliseconds or higher, it sometimes raises timeout exception almost immediately.

example 1:
start at 46.996, timeout at 47.003 -> Wrong: duration is 0.006 milliseconds, but timeout is set to 1 second.

example 2:
start 26.952, timeout at 27.957 -> OK: duration is ~1 second.

Statistically it happens for 0.05% of requests between 0.950-1.000 seconds.

How to address this problem?

Thanks

Comments
Post Details
Added 4 days ago
4 comments
81 views