ORA-29270:打开太多的HTTP请求(ORA-29270: too many open HTT

2019-09-22 06:38发布

有人可以帮我解决这个问题,只要您运行触发器时发生这种情况,但在一个正常的程序工作?

触发:

create or replace
procedure testeHTTP(search varchar2)
      IS

Declare
     req   sys.utl_http.req;<BR>
  resp  sys.utl_http.resp;<BR>
 url varchar2(500);

Begin


  url := 'http://www.google.com.br';

  dbms_output.put_line('abrindo');
  -- Abrindo a conexão e iniciando uma requisição
  req := sys.utl_http.begin_request(search);

  dbms_output.put_line('preparando');
  -- Preparandose para obter as respostas
  resp := sys.utl_http.get_response(req);


 dbms_output.put_line('finalizando response');
  -- Encerrando a comunicação request/response
  sys.utl_http.end_response(resp);


Exception
  When Others Then
    dbms_output.put_line('excecao');
    dbms_output.put_line(sys.utl_http.GET_DETAILED_SQLERRM());

End;

Answer 1:

关闭用户会话,然后将问题解决。

内部有5所HTTP请求的限制。

可能的一个问题是缺少: utl_http.end_response

或在应用中的异常,而不是从RESP对象结束。

修改这样的代码:

EXCEPTION
  WHEN UTL_HTTP.TOO_MANY_REQUESTS THEN
  UTL_HTTP.END_RESPONSE(resp); 


Answer 2:

你需要,一旦你与他们做关闭您的要求,(除非你完全断开形成DB)它不会自动发生

它曾经是utl_http.end_response ,但我不知道这是否是相同的API了。



文章来源: ORA-29270: too many open HTTP requests