title: Express.js connect timeout vs server timeout
body: <p>I am using express and <a href="https://github.com/expressjs/timeout#timeouttime-options" rel="noreferrer">Connect Timeout Middleware</a> to handle the timeouts.</p>
  
  <p>It works great, but I the default <code>node http</code> server's timeout is set to two minutes. </p>
  
  <p>Therefore if I want to set my timeout middleware to a value greater than two minutes, I also have to increase the http server timeout to be slightly bigger (otherwise my connect timeout handler is not called)</p>
  
  <pre><code>const app = express();
  const http = new Http.Server(app);
  
  http.setTimeout((4 * 60 * 1000) + 1); &lt;-- Must set this
  
  app.use(timeout('4m')); 
  </code></pre>
  
  <p>How can I avoid this ? Am I missing something ?</p>