title: infinite timeout for reverse proxy in Apache
body: <p>I am running tornado behind apache. I have created proxy server.</p>
  
  <pre><code>ProxyRequests On
  ProxyPass /chat/ http://localhost:8888/chat/
  </code></pre>
  
  <p>This code works great and pass all my requests to tornado and returns the response back to client. </p>
  
  <p>Now, I am using tornado for long polling. Some of the requests which finishes in a short interval of time say less than 1 minute this reverse proxy works fine. But certain long polling requests this gives 502 proxy error. The reason for this proxy error is that Apache can hold long polling request for just one minute(by default). It closes the request and hence proxy error is received. </p>
  
  <p>Now, I modified the directive to</p>
  
  <pre><code>ProxyRequests On
  ProxyPass /chat/ http://localhost:8888/chat/ timeout=12000
  </code></pre>
  
  <p>i.e I changed the default timeout to 12000 seconds. </p>
  
  <p>This is currently working fine for me. Bu this is not the best solution to the issue. Ideally long polling requests can exceed any timeout specified. So my questions are </p>
  
  <ol>
  <li>How to make the timeout infinite ? i.e the request is never closed by Apache. </li>
  <li>Please also comment: whether the performance of tornado is degraded by going through Apache as proxy server? </li>
  </ol>