R session disconnected

Hello,

I keep getting this message when I try to run R code that pulls data from an SQL server via VPN.

Does anyone have a list of possible reasons this could be occurring (without seeing my code)? Thank you-Drew

Hey Drew,

That message is usually not caused by your SQL code directly. It means your RStudio Server / Posit Workbench session got disconnected, and the browser thinks another connection took over or that is was restarted.

I cant really tell what caused this, but these are some possible reasons:

  • Browser-to-Workbench connection dropped (read more here: Troubleshooting RStudio IDE Connection Errors – Posit Troubleshooting )
  • Session process crashed or was killed: the underlying rsession may have exited because of an R crash, native-code crash from a package, out-of-memory kill, or host/container restart
  • Resource pressure on the host: low RAM, CPU saturation, disk pressure, or container/node termination can make sessions disappear or become unreachable
  • Authentication expiry
  • Multiple tabs / stale browser state

Any other information could help us determine the root cause!

Let me know,

Hello and thank you so much for your detailed response. I’ve restarted my computer when I encountered this problem since my post, and haven’t had this message surface after the restart. It’s very helpful to know that the SQL server connection was not likely the problem Appreciate you taking the time to respond. Cheers-Drew

1 Like

Glad to hear the issue was resolved!

Best,

Luis