My team and I are facing this problem since a long time. We get this error suddenly out of the blue and our code gets deleted. Only if we are using Git repository than we can recover the code else it becomes really difficult to handle such situation.
In the following screenshot it is clearly visible that previous version (right side) has more than 4000 line of code but in current version code below line 732 is deleted.

We get Gateway timeout URI error and this happens.

Please help me find out the root cause of this issue.
Thanks and Regards,
Arpit