Diagnosing Session Disconnects in Posit Cloud

Issue

Sessions in Posit Cloud may unexpectedly disconnect or timeout even during active use, particularly when running memory-intensive operations. This can appear as a timeout issue but may actually be related to resource limits.

Description

When running resource-intensive operations in Posit Cloud, you may observe:

  • The Stop sign icon begins flashing.
  • A green icon appears with the message “session suspended child process running.”
  • The session disconnects shortly after.
  • These issues may occur even when the RAM usage indicator appears to be in the green zone.

Solution

To resolve these issues:

Immediate Workarounds

  • Run intensive operations as background jobs to allow the UI to detach more cleanly.
  • Save intermediate results before running resource-intensive operations (e.g., using saveRDS()).
  • Break down large operations into smaller chunks.

Long-term Solutions

  • Check your current project resources under Project Settings.
  • Consider upgrading your plan if you consistently need more resources.
  • Monitor memory usage during operations using the RAM gauge at the top of the UI.
  • Optimize your code to reduce memory usage where possible.

Additional Tips

  • Clear your R environment regularly to free up memory.
  • Use memory-efficient data structures and operations when possible.
  • Consider using data.table or other memory-efficient packages for large datasets.

If you’re still having issues, you can reach out to Support by opening a ticket here.