title: Increase Headers Timeout in express
body: <p>in order to access a Swagger UI based API I wrote some code.</p>
  <pre><code>app.get('/getData', async (req, res)=&gt;{
      
      token = await getToken().then(res =&gt;{return res})
  
      async function getData() {
          return fetch(dataurl, {
              method: 'GET',
              headers: {
                  accept: 'application/json;charset=UTF-8',
                  authorization: 'Bearer ' + token.access_token
              }
          })
          .then(res =&gt; res.json())
          .catch(error =&gt; console.error('Error:', error));
      }
      const result = await getData().then(res =&gt;{return res})
      res.json(result)
  })
  </code></pre>
  <p>The issue I have is that some requests will take about 10 minutes to finish since the data that gets accessed is very large and it just takes that time. I can't change that.</p>
  <p>But after exactly 300 seconds I get &quot;Headers Timeout Error&quot; (UND_ERR_HEADERS_TIMEOUT).</p>
  <p>I'm not sure where the 300 seconds come from. On the Swagger UI API the time is set to 600 seconds.
  I think it's the standard timeout from express / NodeJS.</p>
  <pre><code>const port = 3000
  const server = app.listen(port,()=&gt;{ console.log('Server started')})
  server.requestTimeout = 610000
  server.headersTimeout = 610000
  server.keepAliveTimeout = 600000
  server.timeout = 600000
  </code></pre>
  <p>As you can see tried to increase all timeouts for express to about 600 seconds but nothing changes.
  I also changed the network.http.response.timeout in Firefox to 600 seconds.
  But still after 300 seconds I get &quot;Headers Timeout Error&quot;.</p>
  <p>Can anybody help me where and how I can increase the timeout for the request to go through?</p>