RStudio Connect: Capacity reached (This application has reached its maximum configured capacity)

Hi everybody. Our organization tests the trial version of RStudio Connect.
We successfully deployed many test apps, but for the first time I have a very strange error.
Never had this before, the app does not seem too cumbersome. Moreover, the app initially works. But when I refresh, it gives the error. So, by refreshing I can sometimes see the app, but it is not stable. Trying to understand logs now too.
Any ideas?


During your evaulation you have full access to our commercial support team. It'd be great if you could send an email to including the details of your error message, your version of Connect, the RStudio Connect log, the deployment log for this piece of content (from the IDE), and the application logs.


Take a look at the runtime settings for you app. This error generally means that you currently have enough active users to surpass the (number of maximum processes x number of connections per process).

The fact that you get it on refresh is just a nuance of the fact that web browsers don't guarantee the ordering of open/close events, so RSC sometimes sees new connections arrive before it's seen your old connection close. In those cases it can be off-by-one for a narrow window as your page loads, in which case you might hit this error every-other refresh.

But the heart of the problem is just that you need to increase the number of processes for this app, increase the maximum number of users per process, or add another RSC server and load balance across them.

Hi, thanks for your responses, guys.
The server is used by several users only, so I am really confused. Plus other apps never had such problems.
**Current settings: **
Max processes
Min processes
Max connections per process
Load factor: 0.50

Any tips how to balance it? I will also shoot an email to support, of course.

I have the same issue on the newest version of connect:

2018/02/13 12:09:09 Starting RStudio Connect v1.5.12.1-10

default load settings,
only two users making use of the app
no settings in .gcfg that override defaults on capacity.
(And among our other ~600 apps, no other apps report this behavior)

An error has occurred
Capacity reached

This application has reached its maximum configured capacity and cannot open another connection. Please try again later.

I have confirmed that the app is not actually just a web page that returns the above, as hilarious as that would be.

So far our two principal suspicions: (1) general rendering of pdfs with params passed in from shiny and (2) the use of dynamically written "children" files within the .Rmd file.
Contacted tech support, expect a response.

So far the response from tech support:

I've talked to our team and this looks like a bug in RStudio Connect - that said, it's one that was recently fixed and we should be able to give you a validated release for that soon.

For those coming to this thread in the future, the issue should be fixed in RStudio Connect >= 1.5.14. However, there is an easy workaround, which is to place any RMDs used by the Shiny application in a subdirectory.

As an example: Say your application (app.R) uses template.Rmd to generate a PDF that can be downloaded on-demand from the application. The recommended directory structure would be:

  • app.R
    -- supporting_rmds
    • template.rmd

The psuedo code would look like:

downloadButton('download', "Download PDF")

With this setup, the runtime setting for the Shiny application should be respected.

For more information:

1 Like

Many thanks and looking forward!