Device updating keeps crashing and restarting from 0%

I am pushing a docker image to resin, but the update process goes very, very slowly (I managed to reach 35% and 97%) until it resets to 0%, just to begin again. The SSH console does not seem to be able to connect. The connection is 3G. Any advice?