Problem
Node's default configuration timeouts requests after 2 minutes. I would like to change the request timeouts to:
- 1 minute for 'normal' requests
- 5 minutes for requests that serve static files (big assets in this case)
- 8 hours for uploads (couple of thousand pictures per request)
Research
Reading through Node's documentation, I've discovered that there are numerous ways of defining timeouts.
I'm using Express which also provides middleware to define timeout's for (specific) routes. I've tried that, without success.
Question
I'm confused about how to properly configure the timeout limit globally and per route. Should I configure all of the above timeouts? How is setting the server's timeout different to setting the socket's or request's timeout?