RStudio-Server locks session

If you leave an RStudio session idle for a while it will lock and require a user and password to be entered to unlock the session. As this is automated in the scripts, I had to cat the /proc/pid/environ to get the RSTUDIO_PASSWORD that is set during startup. Using this along with the USER set accepts the user/password combo but it takes you to a page that says this page doesn’t exist, rather than resume the session as expected.

Is this expected behavior? I’m trying to find out how to extend the timeout for locking the session but I haven’t found it after an hour of searching.

Kenny, MSU RCI SysAdmin

Hey sorry for the trouble. This sounds like RSTUDIO itself is setting the timeout? I’m also trying to find similar behavior.

There are defaults for OOD timeouts which can be extended at the nginx stage. The field to set in the nginx_stage.yml to change this would be passenger_pool_idle_time which you can see here:

this would then effect all timeouts on the server for all PUNs started to be clear though, and this is doesn’t sound like what you are experiencing. Same for any kind of scheduler timeout.

What is the url that it takes you to which fails?

Do you reconnect if you go back to the session card under Interactive Apps and click “Connect”?

Also, you can get the information for the session from the connection.yml that writes to the bc_osc_rstudio/output which you can see if you click the “Session ID”.

Screenshot from 2023-06-27 12-02-25

Along with the questions above, what is the content of the rsession.log when the timeout happens?

Hi, thanks for the replies Travis. Not sure how I missed connection.yml … lol, just got back from vacation so my head’s not fully back in the game.
I’m running an RStudio Server instance and will let it time out to get the URLs and log data for you.


My RStudio session locked after 60 minutes. I used my own username and the password found in connection.yml and it took me right back into my session :slight_smile: . This is good, the station should lock should they leave for a bit.

When I tried using the session password last time to unlock RStudio I think I hit the “tries” limit and it then invalidated the session as a protection mechanism.

Hi Travis,
A new report. I opened a RStudio session and let it sit for over an hour to let it lock. I was able to log back in fine. I then closed the tab and hit the button again.
The URL it now tries to open is
The weird part is, this only happens after RStudio locks the station. When the app first starts up I can hit the connect button as many times as I want and it opens the right URL.
If I remove the appUri at the end it opens my RStudio session.


Huh, yeah this is odd haha. I’m wondering how that url ends up with the appUri tacked on like that at the end.

I’ll have to look at this more because I am not even sure at the moment where that could be happening and need to investigate a bit.

Thanks so much for the info and patience on this!

I got it from a user who left his RStudio session running all night and tried to reconnect and I asked him for the URL.

:slight_smile: bugs are fun

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.