Rstan process on remote desktop stops when I'm disconnected

Hello everyone,

I am running a model using rstan in RStudio on a remote Windows laptop that is connected to my university’s server. I access it from my local computer using Windows Remote Desktop Connection (RDP) over my university’s VPN.

The model runs fine while I have the Remote Desktop window open. However, when I close the RDP window (which should simply disconnect the session) and turn off my local computer, the rstan process appears to stop running. When I reconnect the next day, it resumes.

I suspect the issue may not be an rstan issue per se but I still wanted to post this here in case somebody else dealt with something similar. Is there a reliable way to keep a long-running rstan process going on a remote Windows machine, independently of the RDP session?

Any advice would be greatly appreciated!

Best,

Bugay

Sounds to me that the remote Windows laptop goes into sleep mode when it is disconnected, and wakes up when you reconnect using the Remote Desktop Connection. I have done it before where I put my laptop to sleep in the middle of a Stan run, and when I wake up the computer it continues on, so it’s definitely capable of pausing MCMC sampling when asleep.

Are you able to check the power settings on that laptop to ensure that it does not go to sleep after x minutes of inactivity?

Hi,

Thank you! I was using a third-party app that disables the sleep mode, and tried running my model with that on but what you recommend is way more straightforward. I’m giving it a go now, thanks a lot!