Error when deploying R Shiny app: Error: C stack usage is too close to the limit

I am working on a simple Shiny app that takes URLs from a published Google Sheet and obtains some information about them from the Zillow and Google Maps API. The app loads fine locally (using R Studio and clicking the "Run App" button). However, when I deploy the application, I get the following messages / error:

Preparing to deploy application...DONE
Uploading bundle for application: 274189...Error: C stack usage  7969528 is too close to the limit
Execution halted

A quick search of the error suggests that it indicates some sort of memory issue (i.e., here, possibly due to a typo or other error in the code causing some type of recursive loading of data). However, I've combed through and simplified the code, and can't seem to find the offender.

What is causing this error when deploying the app?

The source files are here.

Where are you deploying the app to? Connect?

Where are you deploying the app from? Local desktop? Have you kept an eye on the memory usage of your development environment during the deploy process? Is that the entire deploy log?

Thanks. To from my local desktop. I have not kept an eye on my memory usage, but have restarted R Studio before deploying again. That's the whole log.

I just tried to deploy a different app (this app.R file) and got the same error! Is it possible that my apps collectively are using too much memory on

I may open a support ticket here, given that I have a starter plan.

Yes, I think that makes sense. That was my next recommendation - trim the app down to bare-bones JUST packages and see if that will deploy. (Could even trim out the packages to see if a naked app will deploy).

I'm not super familiar with the shinyapps tooling, but you could also monkey around in the shinyapps UI and see if there is anything discernible there. Hopefully support will be able to provide additional clarity!

Is this another presentation of this issue:


Hi, I went through some troubleshooting with support, and it looks like this was due to the "cli" package. When I ran:


This was fixed!

1 Like

I see it looks like cli was identified as the culprit in that issue (I installed the CRAN version of the package with install.packages("cli") to resolve this issue.