Snapshot restore results in a 504 Gateway Time-out nginx error.

Hi,

I am trying to restore a snapshot to a new multisite site.
It is going through and restoring tables till it reaches a certain table and then I receive a
504 Gateway Time-out nginx error..

The server logs show this error:

Timeout waiting for output from CGI script /wp-admin/admin-ajax.php, referer: /wp-admin/network/admin.php?page=snapshots_edit_panel&snapshot-action=restore-panel&item=1491213244&snapshot-data-item=1491213244