title: How long does an http connection stay open if the server takes very long to reply?
body: <p>I have a client machine running a java program that opens a http connection to another server that is running a tomcat servlet container. This servlet will build a pdf file and The HTTP response will be a stream of bytes which make up the pdf file. In between the two machines can be any number of routers or firewalls. </p>
  
  <p>Now let's say the server is taking very long to build the pdf file, is there a limit on how long the http connection will stay open? I know this answers will very likely depend on the configuration of the server, the tomcat, the firewall, the network... But I'm looking for general information. For example, what are default or commonly used values? How are they configured?</p>
  
  <p>If there is a duration limit, what are the main settings to look for/configure if we want to increase the time until the http connection times out?</p>
  
  <p>EDIT: Please note this is a server connecting to another server using java programs and the http protocol. Browsers have nothing to do with this, so I'm not looking for timeout settings for browsers.</p>