I have this code, everything works fine until users cancel during the UTL_HTTP.GET_RESPONSE than the connection stay in CLOSE_WAIT when the session reach to 5 of these connections I'm getting "too many open HTTP requests"
resp := UTL_HTTP.GET_RESPONSE(req);
DBMS_OUTPUT.PUT_LINE('HTTP response status code: ' || resp.status_code);
DBMS_OUTPUT.PUT_LINE('HTTP response reason phrase: ' || resp.reason_phrase);
FOR i IN 1..UTL_HTTP.GET_HEADER_COUNT(resp) LOOP
UTL_HTTP.GET_HEADER(resp, i, name, value);
DBMS_OUTPUT.PUT_LINE(name || ': ' || value);
END LOOP;
UTL_HTTP.END_RESPONSE(resp);
EXCEPTION
WHEN OTHERS
THEN
IF v_utl_resp.private_hndl IS NOT NULL
THEN
UTL_HTTP.end_response (v_utl_resp);
END IF;
IF v_utl_req.private_hndl IS NOT NULL
THEN
UTL_HTTP.end_request(v_utl_req);
END IF;
RAISE;
END;
Aucun commentaire:
Enregistrer un commentaire