I have deployed my application on Digital Ocean and have a few queries and mutations that could take more than 5 minutes. However, my requests fail after 5 minutes. In Postman, it gives a socket hang up
error, and in the browser, it just says failed to fetch
in response. I can’t find any reason why this is happening. In my Nginx configuration, the timeout is already set to 90 minutes:
location / {
proxy_pass http://feat/graphql;
proxy_set_header Connection '';
proxy_read_timeout 5400s;
proxy_send_timeout 5400s;
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
}
In my app, I have set the timeout to 10 minutes:
app.listen(port, () => {
console.info("Server is running on http://${host}:${port}/graphql");
}).setTimeout(1000 * 60 * 10);
I have looked through all the Digital Ocean settings, and I am not using any load balancer. However, I couldn’t find what could be causing this issue.
I am looking for a solution that ensures I get a response successfully, even if it takes more than 5 minutes.