【发布时间】:2016-12-02 17:11:56
【问题描述】:
我们在尝试执行以下过程时收到 ORA-29270:too many open HTTP requests。请让我们知道我们需要在哪里以及所有需要关闭 Request 和 Response ,请提供我们如何处理异常的过程示例之一。并且所有请求都应该正确处理。
BEGIN
l_http_request := utl_http.begin_request (p_url, 'POST');
BEGIN
-- build the request by using utl_http.set_header() and utl_http.write_text()
-- ...
-- process the request and get the response:
l_http_response := utl_http.get_response (l_http_request);
WHEN OTHERS THEN
--- utl_http.end_response(http_resp);
error_code := '91';
error_desc := SQLERRM || ' Unhandled Exception';
END;
BEGIN
LOOP
-- read the response using utl_http.read_line()
-- ...
END LOOP;
-- Complete the request and response, and close the network connection
utl_http.end_response(l_http_response);
EXCEPTION
when utl_http.end_of_body then
utl_http.end_response(http_resp);
WHEN error_out THEN
NULL;
WHEN OTHERS THEN
--- utl_http.end_response(http_resp);
error_code := '91';
error_desc := SQLERRM || ' Unhandled Exception';
END;
END;
【问题讨论】:
标签: plsql