问题
I'm developing quite a complex shiny app that runs on a private shinyserver.
Only the pages that contains large plotly heatmaps (50-70Mb) are not working online (but the pages are working perfectly on my local machine).
What I get is the usual message "Disconnected from the server Reload"
.
When this error message is shown no log file is produced in /var/log
.
What I tried to do is:
check if it's a missing packages problem, it's not;
check if it's a wrong paths problem, it's not;
modify the shiny-server.conf file contained in
/etc/shiny-server/
adding the top lines:http_keepalive_timeout 300; sockjs_heartbeat_delay 300;
So I'm led to believe that the problem is related to the size of the plots. How to face that problem? Unfortunately due to the size of the shiny app is not easy to exhibit a reproducible example of my case here.
回答1:
I have run into the same problem using the heatmaply package which depends on the dendextend package. The dendextend package relies on a recursive expression which can easily exceed the number of nested expressions allowed by the version of R running on your server. See this issue: https://github.com/talgalili/dendextend/issues/53.
You can try setting the expressions limit well above the default 5000 and see if this helps (max allowed is 500,000).
options(expressions = 500000)
来源:https://stackoverflow.com/questions/58119865/disconnected-from-the-shiny-server-cause-of-large-plotly-r-heatmaps