【问题标题】:ORA-29270: too many open HTTP requestsORA-29270: 打开的 HTTP 请求太多
【发布时间】:2010-11-17 03:59:31
【问题描述】:

有人可以帮我解决每当您运行 TRIGGER 但在正常 PROCEDURE 中工作时出现的问题吗?

触发:

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;

【问题讨论】:

  • 2016年还是有用的。
  • 有用的问题

标签: plsql oracle10g


【解决方案1】:

关闭您的用户会话,然后问题就解决了。

内部有 5 个 http 请求的限制。

可能是缺少问题:utl_http.end_response

或应用程序中的异常,而不是与 resp 对象的关闭。

像这样修改代码:

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

【讨论】:

  • 我在 utl_http oracle doc reference 之后更改了我的实现,但错误仍然存​​在。关闭我的用户会话是有效的。
【解决方案2】:

您需要在完成请求后关闭它们,它不会自动发生(除非您完全断开与数据库的连接)

以前是utl_http.end_response,现在不知道是不是同一个api了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-08-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多