Advanced Topics

Compute Hours

Posit Cloud creates a container when a project is opened or code in it is executed, when an application is run, when an API is accessed, or when content is generated. While the container remains active, Posit Cloud records usage for the space and account within which the content resides. Usage is measured in compute hours. The size of the container and the number of CPUs allocated to it determine the rate at which compute hours are generated according to the following formula:

(GBs of RAM + CPUs allocated) / 2

The rate multiplied by the number of hours the container is active determines the number of compute hours generated. For example, working with a project that has 2 GB of RAM and 1 CPU allocated for 1 hour would generate 1.5 compute hours: (2 GB + 1 CPU) / 2 * 1 hour.

You control the RAM & CPUs allocated to projects and outputs via the Settings panel. See Project Settings: Resources or Output Settings: Resources for more details.

The following table describes when usage generation begins and ends for different kinds of content on Posit Cloud.

Content Type Begins Ends
Project When the project is opened or resumed

If no code is executing, 15 minutes after the last interaction with the editor

If code is executing, the container will stay active until the code finishes, or the project’s execution limit is reached

Application When a user interacts with the application Configurable via Output Settings: Scaling
API When a request is made to the API Configurable via Output Settings: Scaling
Generated Content When the content is published or a new revision is generated When the content generation completes

You can view the details regarding compute hours generated in your account or space at any time. See Account Usage or Space Usage for additional information.

Depending on your plan, you may be limited in the number of compute hours you can use per month, or be billed for compute hours that exceed those included in your plan. See the Plans & Pricing page for details on each plan. For plans where you are charged for additional compute hours, we will notify you via email if you approach your limit in any given month.

Working with GitHub

GitHub credentials are not persisted across projects. For each project that is created from a GitHub repository, you will need to supply your credentials to push and pull from that repository.

When creating a project from GitHub using the “New Project from Git Repository” command, you must supply the HTTPS URL from GitHub. You can then push / pull from within the project using HTTPS authentication, supplying your Personal Access Token (GitHub no longer supports password authentication). When creating a project from GitHub using the “New Project from Git Repository” command, you cannot use SSH Git authentication. Once a project is created, you can configure SSH authentication from within the IDE.

If you have a linked GitHub account, your identity has already been configured for you. If you would like to change the name or email being used, you can use the commands below:

git config --global user.email "you@example.com"
git config --global user.name "Your Name"

To prevent your credentials from expiring after 15 minutes, a cache has been configured for 12 hours. The cache duration can be modified through the cache credential helper bundled with git. The command below would set the timeout to an hour:

git config --global credential.helper 'cache --timeout 3600'

From the git documentation: “this command caches credentials in memory for use by future git programs. The stored credentials never touch the disk, and are forgotten after a configurable timeout. The cache is accessible over a Unix domain socket, restricted to the current user by filesystem permissions.”

Working with Private Git Projects

Working with private, non-GitHub projects requires the following steps:

  1. In a new RStudio project under Tools / Version Control / Project Setup, select “Git” as the version control system and agree to all the prompts. This will create a git repo locally and the git pane should appear in the IDE.

  2. Configure your local git so it knows where to find the remote repository (replace the URL with your repo URL):

    git remote add origin https://gitlab.com/myrepo.git
  3. Fetch your repo contents (replace main with the name of your branch, if applicable). You will be prompted for credentials here:

    git pull origin main
  4. Do one of the following:

    1. Tell git to point to your local branch called “master”, which was created by git in step 1, to the branch you just pulled from your remote repository (replace main with the name of your branch):

      git branch --set-upstream-to=origin/main master
    2. As an alternative, assuming your remote branch is not already called master, skip step 4a and check out the branch you just pulled. This branch should already be pointed correctly to your upstream branch in your remote repository (replace main with the name of your branch):

      git checkout main

      In this case, you will have an unused local branch called master that is empty and not pointed at the remote repo.

    At this point the git pane in the IDE should behave as expected.

  5. Add your user configuration (using your own email and username):

    git config --global user.email "you@gmail.com"
    git config --global user.name "username"

    Now you should be able to push and pull from your repository as normal.

R Version Retention Policy

We maintain access to the last 5 or 6 major.minor versions of R, spanning roughly the last 5 years of R development.

For each major.minor version, we provide the most recent patch release. The upgrade from one patch release to the next is automatic and requires no intevervention on your part. For example, a project using R version 3.6.x will always use the most recent patch release of 3.6 - there is no way to “freeze” a project to a particular patch release.

API Access from R

You can access Posit Cloud’s API to manage space members programatically using the rscloud package.

You will need to create client credentials to use the package. To do so, click on your icon/name in the header to reveal the User panel, then click on “Credentials”. This will take you to the Credentials page of Posit User Settings, where you can create and manage your client credentials.

System Packages

We install an extensive set of system packages before any R packages are installed.

Security Information

Each Posit Cloud project is deployed into its own container, and the network access between containers is tightly controlled. All access to posit.cloud is over SSL, and requires an authenticated login. All metadata and project data is encrypted at rest. Posit Cloud is currently hosted on Amazon’s Web Services (AWS) infrastructure. The infrastructure used is not the HIPAA-compliant stack, so if you need to be in a HIPAA-compliant environment, we recommend deploying and operating your own RStudio Server, or Posit Workbench.

Troubleshooting

If you are experiencing unexpected, non-coding errors working with a project, here are a few things to try.

Relaunch Project

If you are working on a project, and it fails to load or becomes completely unresponsive, you can relaunch the project. Depending on the underlying problem, relaunching the project may fix it and let you continue.

How To

Press the menu button and choose “Relaunch Project” from the Project menu.

Allocate Additional Memory

Running out of memory while working on a project may be the cause of a variety of errors.

The project memory gauge will give you an idea of what percentage of available memory your project is currently using. The gauge updates roughly every ten seconds, so it may not show the exact usage at the current moment. Note that reclaiming unused memory is controlled by R and the operating system - you may see uncanny fluctuations in the gauge as the system manages memory.

Project memory gauge is not currently supported for Jupyter Projects

If you suspect your project is running out of memory, you may be able to increase the memory allocated to the project. See Project Settings: Resources in the Project Details section for more information.