Changing rsconnect.max.bundle.files

I am trying to deploy a shiny application to the server that has about 16,425 files mostly that are plots to display in an application. I currently have these two lines of code in the app.R file
options(rsconnect.max.bundle.size = 3000000000)
options(rsconnect.max.bundle.files = 16500)
The first line works as I was getting an error saying the size was too big but now that error goes away and I do have access to a standard account so I will be able to have a larger file size. The issue is with the second line that is not working because every time I try to deploy I am still getting Error in enforceBundleLimits():
! appDir ('R:/Bozeman/ProjectCode/APAS/2024/Apas2024Mapping') is too
large to be deployed.
:heavy_multiplication_x: The maximum number of files is 10000.
:heavy_multiplication_x: This directory contains at least 10001 files.
:information_source: Remove some files or adjust the rsconnect.max.bundle.files option. that error. Is 10,000 files the hard cap that cannot be changed when deploying an application to Any help or idea would be appreciated.


There is no limit to the number of bundle files you can upload, but bundles are limited to a maximum size of 1 GB for the Free and Starter plans, and up to 5 GB for the Basic, Standard and Professional plans. For the latter plans, note that the rsconnect package has a default bundle size limit of 3 GB, independent of your plan limit. If you plan to deploy application bundles larger than 3 GB in size, you can override the rsconnect default by setting this option first:

options(rsconnect.max.bundle.size=...) where the value is in bytes. Do not set the maximum size larger than the limit for your plan, or application deployments will fail.


I think I have the size set correctly and that part is not erroring out anymore, but the number of files is what is causing the deployment to fail. Unless the "The maximum number of files is 10000.
:heavy_multiplication_x: This directory contains at least 10001 files.
:information_source: Remove some files or adjust the rsconnect.max.bundle.files option." error is just a catch all for any size issue in deployment. Is that the case or is the "options(rsconnect.max.bundle.files = 16500)" line not working correctly? Thank you again for the help.

It seems there is indeed a hard cap of 10,000 files in place. We will need to update our documentation to reflect that!

My suggestion for you, since you said most of the files are plots, is to put all your plots into a zip folder and upload the zip folder as part of the bundle. Then when your app starts have it unzip the folder to access all the plots. This should hopefully get you under the 10,000 files limit.

Perfect, sounds good, thank you so much for your help!

Help needed! Adjusting bundle size limits in my Shiny app, deployment errors due to a large number of plot files (16,425). Even after setting rsconnect.max.bundle.files to 16,500, I'm stuck with the error message indicating that the app directory is too large. Any tips or workarounds to overcome this hurdle? Thanks!

Hi @Anakinrsubjf,

See my other comment above about zipping all your plot files together and then unzipping them inside the app. Hope that works for you!