By default axios (our API request framework) doesn't timeout network connections if they hang.
It seems likely that during the server backup, since mSupply Server API Requests simply hang and the Sync Saga simply hangs waiting for the connection to finish.
If the connection is hung for a long time (say 20minutes) the connection appears to be timed out somewhere in the OS or network layer, but this isn't correctly handled in our application.
With this change, we've added a request timeout which returns an error if the connection can't be made to the server.
We've also slightly improved some of the logging and error handling, including a sync status section in the configuation.
Closes #252
By default axios (our API request framework) doesn't timeout network connections if they hang. It seems likely that during the server backup, since mSupply Server API Requests simply hang and the Sync
Saga
simply hangs waiting for the connection to finish.If the connection is hung for a long time (say 20minutes) the connection appears to be timed out somewhere in the OS or network layer, but this isn't correctly handled in our application.
With this change, we've added a request timeout which returns an error if the connection can't be made to the server.
We've also slightly improved some of the logging and error handling, including a sync status section in the configuation.