Using rsconnect I have deployed an app to shinyapps.io, however, the app fails to start with my log file showing an error is occurring when loading required packages.
R Version: R version 4.1.1 (2021-08-10)
snowfall 1.84-6.1 initialized (using snow 0.4-4): parallel execution on 12 CPUs.
Library plyr loaded.
Library plyr loaded in cluster.
Error in value[[3L]](cond) :
Stop: error loading library on slave(s): stars
Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Shiny application exiting ...
Execution halted
The app is quite large, and so I have tried to incorporate multicore processing, using the package snowfall. Upon start up this package selects a number of available CPUs (referred to as slaves) over which too 'spread' the workload. The package then loads all other required packages across this cluster of slave CPU's. My log file shows that upon starting up my app, snowfall selects 12 CPUs and then loads plyr across this cluster. But when snowfall moves onto the next required package (in this case stars) it fails to load the package across the CPU cluster thus causing the application to crash on load up. This app works perfectly on my local machine, and the error persists irrespective of what order the required packages are loaded to the cluster i.e., it is always when trying to load the second package that the error occurs, not just when trying to load stars.
I don't suppose anyone has encountered a similar error when using multicore processing with shinyapps.io, or has any advice on where to start troubleshooting? Thanks!