title: Koa - cannot increase default request timeout
body: <p>I need help increasing the 2 min default request timeout in a Koa server.
  I have a long task operation that is taking a few minutes. When it is finished I'm sending a response back. The problem is that the connection is automatically closed after a timeout of 2 min which is node js default.</p>
  
  <p>I tried everything in google.
  tried using all kind of third party npm modules.</p>
  
  <p>tried ctx.request.socket.setTimeout(0)</p>
  
  <p>I am out of ideas and need help.</p>
  
  <p>I am executing my requests to the server using postmen with infinite timeout.</p>
  
  <p><strong>Update</strong> - This is a code snipped of something im trying to do:</p>
  
  <pre><code>const Koa = require('koa')
  const app = new Koa()
  const PORT = 7555
  const server = app.listen(PORT)
  
  app.use(async (ctx, next) =&gt; {
      ctx.req.setTimeout(0);
      await next();
  });
  
  
  app.use(async (ctx, next) =&gt; {
      const wait = async () =&gt; {
          return new Promise((resolve, reject) =&gt; {
              setTimeout(() =&gt; {
                  resolve()
              }, 1000 * 60 * 5)
  
          })
      }
      await wait()
      console.log("settimeout finished", new Date())
      ctx.response.body = { success: "true", date: new Date() }
  })
  </code></pre>