502 server error when running model

A colleague of mine and I have recently experienced a similar issue. Even if the models are cached locally, a momentary internet disconnection results in an error if it coincides with a model/tokenizer load in a series of training scripts. My thoughts on potential reasons go no further than speculations so, any suggestions on what might be the issue and how to solve it is pretty much welcome.