Streamlit server consistently failed status checks during heavy computation


I’m intermittently getting “Streamlit server consistently failed status checks” errors. It seems the problem part of my app is when it enters into a cross-validation for loop so I’m guessing it gets too busy to respond to health checks and time out’s results (line 213 of Either that or possibly a memory leak, but I’m not getting resource-type errors. If I increase the number of folds it runs from 3 to 5, then I will get the error and it will fail to load. If I run it at 3 it will work most of the time.

Can I change the frequency of the status checks?

I would be much obliged if anyone could help me fix this without reducing the computation it performs.

The code is at:

And it’s deployed at: (3 folds).

Thanks again,

I also get these errors too:
[manager] The service has encountered an error while checking the health of the Streamlit app: Get “http://localhost:8501/healthz”: dial tcp connect: connection refused