uploading large datasets into shinyapps.io

Hi, all,
I have a shinyapp, and it runs great locally. The app uses 7 fixed data matrices(~1GB/each) and calculates the outputs based on the user's query inputs.
In my local machine, I load the 7 data matrix into the "global environment", and then run shinyapp directly. Everything is fine and the app loads fast.

Then, I tried to upload my app to shinyapp.io. I met 2 issues:

  1. When I put those 7 Rdata files in my App folder and run "deployApp", I got this error:
    Error in force(code) : Could not upload file.
    I already bought the Basic plan, which should allow a max of 8GB ram. When I remove those 7 Rdata files, I could deploy my App. But the app did not work because no data loaded.

  2. If I include:
    load("MyMatrix1.Rdata")
    load("MyMatrix2.Rdata")
    ...
    in my app.R file, the App will load very slowly. What could I do to preload those 7 data matrices into the shinyapps.io server as global variables just like what I did locally?

Any suggestions?

Thank you very much,
Raymond

First of all, I think there may be a mistake in the documentation regarding the bundle limit, and for that, I apologize and get a fix out presently.

This section of the documentation should read:

The bundle size that can be uploaded is limited to 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 1 GB, independent of your shinyapps.io plan limit. If you plan to deploy application bundles larger than 1 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 shinyapps.io plan, or application deployments will fail.

You can compress your data files, deploy, and then uncompress them before reading them to work around the upload limit. Do make sure that you have set the rsconnect option appropriately.

The upload limit should not be confused with the RAM limit, which is 8 GB.

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.