I'm importing a large dataset into the database using the BatchBuilder in Drupal. It takes more than one and a half hours to complete all the operations in the batch. The process starts with user action on a page, and the progress of the batch operation is shown to the user. We are facing an error on the batch process if there's a connectivity issue on the user side. For example, if the user started the batch process in a tab and left the machine idle. After some time, the machine enters into suspended mode, and the internet connection won't be available. This will halt the batch process, and the entire progress made will be gone.
Screenshot of the batch process running. 
Runs into an error if there's a connection issue on the user end. 
Is there any way or workarounds to fix this? May be like changing the batch operation to the server side from the client side.