On Mega backend, often times some subset of files are uploaded at extremely low speeds, in some cases the speed in <100 bytes/sec.
Temporarily axing the network connection forces a retry on those files which fixes the issue, which will then arise on different files.
Feature suggestion:
Monitor the performance of every chunk, for under-performing chunks (50% or more deviation from the mean) force a retry on the chunk. This should fix the problem.