title: ORA-29273: HTTP request failed intermittent error using the utl_http package
body: <p>I'm using the <code>utl_http</code> package to make HTTP GET requests to an IIS site on the same server (local) as Oracle. Sometimes it works and I get the response, but more often than not it hangs for about 15 seconds and then I get this error:</p>
  
  <blockquote>
    <p>ORA-29273: HTTP request failed ORA-06512: at "SYS.UTL_HTTP", line 1722 ORA-29263: HTTP protocol error</p>
  </blockquote>
  
  <p>As a test, I've got a small static text file in the IIS site, so this is how I'm testing it:</p>
  
  <pre><code>select utl_http.request('http://domain.com/test.txt') from dual
  </code></pre>
  
  <p>I get the same problem if I run it in Oracle Apex instead of direct on the db.</p>
  
  <p>The other thing I've tried is to create a package of my own that does the HTTP request using the long <code>utl_htp.begin_request()</code> method, instead of the <code>utl_http.request()</code> shortcut. This gives the exact same problem (works sometimes but errors mostly - same error).</p>
  
  <p>The pattern I'm seeing is if I wait a while and then try, it works for the first 2-10 times, and then begins erroring. When it does work, I get the response instantly and when it errors, there is always the delay before the error.</p>
  
  <p>If I request the text file URL (or any other resource in the site) using a remote web browser then I get the correct response every time.</p>
  
  <p>I have tried setting a timeout like below but it doesn't have any effect. For example instead of timing out after 3 seconds it continues for 10 or 15 seconds before the error is shown.</p>
  
  <pre><code>UTL_HTTP.set_transfer_timeout(3);
  </code></pre>
  
  <p>I think I can rule out ACL because it works sometimes.</p>
  
  <p>Does anyone know what might cause this behaviour?</p>