Background Execution

I have R code for conducting simulations that i am submitting through Posit. I have been testing small numbers of replications (10-20) and the code works find and i get the expected results. Once i up the number of replications to 100, my project 'goes to sleep' and when i log back in I see the following error:

Error: no more error handlers available (recursive errors?); invoking 'abort' restart

My background execution limit is set to 96 hours...and given how long it has taken 20 replications, 100 should complete in a few hours. I'm new to Posit, so forgive me, but i was under the impression that the script would continue to run up to the maximum BEL of 96 hours. Am i misunderstanding?

Thanks,

Jason

It's not really clear from your post where this code is running (Posit Cloud? your own instance of Posit Workbench?). Your project does not appear to be going "to sleep"--based on the error you're describing, it's likely that you're causing your session to crash by exhausting the resources available to it.

Please share more about:

Sorry...yes i'm running the code in the Posit Cloud. I have successfully run sets of simulation on a desktop R Studio, and I have been able to run a small number of them on the Cloud as well. I didn't imagine that i'd be exhausting the resources available, I had it set to 10GB and 8 CPUs, with 96 hours of background execution.

I'm using future::plan(multisession) to run the simulations, generating some data and running some models, and capturing output. I guess i thought if my approach was flawed, it would kick an error even if i'm running only 20 replications...but those have been successful.

There is still very limited information here but are you sure you are not exceeding memory limits ? The fact that 20 replica work but 100 don't seem to indicate some problem with resources. Are you monitoring memory utilisation at all ?

If 20 replica work, how about 40 or 60 ? How much more memory do 40 and 60 replica consume ?