core: Server Timeout
We just ingested more than 3 Million additional data points into our database (creating countless records) this had caused our queries to skyrocket past the default nodejs server timeout of 120,000ms.
I’ve tried disabling the Http timeout inside of app/Listeners/Http.js:
const Server = use('Adonis/Src/Server')
Http.onStart = function () {
Server.getInstance().timeout = 0;
};
A value of 0 will disable the timeout behavior on incoming connections.
https://nodejs.org/api/http.html#http_server_timeout
However this doesn’t seem to work as timeouts still occur after 120,000ms and nginx indicates that the server is still prematurely closing the connection.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (7 by maintainers)
@thetutlage I moved my code from the hook into the server.js file by adding a .then.
Now my server waits for the query correctly (With it taking upwards of 170,000ms) and the route returns 0.
Was my hook wrong in some way?