Empty reply from server for exports and backups

After some experiments, I found that the timeout is actually occurring on the server side - in fact, most operations in curl do not have a timeout.

The culprit is actually in Dgraph’s serveHTTP function, which times out response writes at 10 minutes. Of course, we can’t remove the timeout without risking leaking connections, so the only course of action here is to increase the timeout if desired.

This article outlines an approach for executing long-running tasks in a REST API. The idea is to add the task to a queue and immediately return its ID. The client can then query using this ID to find the status of the task.