Project goes to sleep at random times while code is running

Hello, I am running Bayesian hierachical models with Stan and the project randomly goes to sleep before the end of the simulations (sometimes after just a few minutes, somethimes after >1hr of run time). I tried many times and I never get outputs.
Some other times the project crashes to an "unexpected error". I have a Plus account with plenty of memory and run time for this application.
The code runs fine in RStudio Desktop.
Thank you

Are you using Posit Cloud? If so you'll want to ask this question in that forum: Posit Cloud - Posit Community