Print massive (atomic) character freezes RStudio Server

I (accidentally) printed a massive string (atomic, i.e. length-1). (I don't know how big, exactly; I ran gsub('[0-9]', '', x) on x with nchar(x) roughly 65 million. I expected most of the string to be [0-9], so let's say roughly 1 million characters were printed.)

RStudio Server has now frozen (not crashed/disconnected -- I don't get any prompt to terminate R, etc.):

Is there anything I can do to unfreeze this? Is there anything RStudio Server can improve to prevent this type of crash?

You should be able to get out of this hole by:

  1. Forcefully shutting down any running rsession processes,
  2. Clear your session state, as per

Let us know if this isn't sufficient.

RStudio likely could do something to better recover from this sort of situation, but it would take some discussion as to what we could do to help in this case.

Unfortunately this was on a deployed Docker instance with rserver the main process, so I couldn't kill the process without restarting the instance. I guess this goes back to R default printing "having eyes to big for its stomach"... I'll just try and be more careful next time :sweat_smile: