I had these issues sometimes, but I think my problem was that I detached the SD card from my computer too early. Making the gcode file corrup or not complete. Tried a different brand SD card?

And, if my laptop which was attached to the RAMPS USB boots up it will make the printer stop.

Not sure if this helps you, but worth the try.