Thanks for you response, @lingareddy_Alva !
The code ran for months before starting to exhibit this behavior. Could something have changed now in Databricks?
And how do I fix this? Is a time.sleep(x) after I import the modules something that can help?