Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow R session to suspend when using the connections panel #4194

Closed
javierluraschi opened this issue Jan 22, 2019 · 4 comments
Closed

Allow R session to suspend when using the connections panel #4194

javierluraschi opened this issue Jan 22, 2019 · 4 comments
Labels
connections enhancement stale

Comments

@javierluraschi
Copy link
Contributor

@javierluraschi javierluraschi commented Jan 22, 2019

RStudio Server reprex:

sc <- spark_connect(master = "local")

Then wait until session should suspend.

Actual: Session does not suspend.
Expected: There is nothing wrong with the default behavior regarding RStudio Server preventing connections from suspending when a connection is active. We can simply not know if the remote connection supports getting suspended or how to reconnect to a database or Spark and leave the connection in the same state.

However, we should allow users to opt-out of this behavior with an option, say by setting options(connectionSuspend = TRUE), or:

library(sparklyr)
# Optional spark_install() on first run.

withr::with_options(
    list(connectionSuspend = TRUE), {
    sc <- spark_connect(master = "local")
})

Which should allow the session to suspend even when the connection is active.

See: https://community.rstudio.com/t/how-to-disconnect-spark-when-idle/22130

@jmcphers
Copy link
Member

@jmcphers jmcphers commented Jan 22, 2019

We can simply not know if the remote connection supports getting suspended

How would you feel about having the remote connection tell us this, via a new part of the connections contract?

@javierluraschi
Copy link
Contributor Author

@javierluraschi javierluraschi commented Jan 22, 2019

That works for me as well!

@stale
Copy link

@stale stale bot commented Feb 5, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs, per https://github.com/rstudio/rstudio/wiki/Issue-Grooming. Thank you for your contributions.

@stale stale bot added the stale label Feb 5, 2021
@stale
Copy link

@stale stale bot commented Feb 19, 2021

This issue has been automatically closed due to inactivity.

@stale stale bot closed this as completed Feb 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
connections enhancement stale
Projects
None yet
Development

No branches or pull requests

3 participants