Search code examples
rshinycentos7shiny-server

ERR_EMPTY_RESPONSE shiny server


I am currently hosting a number of shiny apps on a shiny-server open source on a centos7 distro. All the apps were/are working fine but for one of the apps when I try to go to the url I get the following message:

This page isn't working <ip.address> did not receive any data. ERR_EMPTY_RESPONSE.

All the other shiny apps hosted on the same shiny server are working just fine. I checked /var/log/shiny-server and there is no log file for this App. As the other apps are working fine, I dont think its a port issue.

The only difference between other apps and this one is that it was used the most by its users. Is there some restriction/limit on shiny-server for runtime? I can't figure out what the problem is. The app runs fine on RStudio Server and if I copy it into a new directory in /srv/shiny-server/ with a different name, it also works fine.


Solution

  • A couple of thoughts:

    • If a process closes successfully, then shiny deletes the log files. So it's possible you may be missing some log files. You may override this with preserve_logs, see here. Your users may be triggering some error through their interactions with the app, but other sessions are successful, so shiny deletes the log files.
    • Shiny creates one process per app be default, but an unlimited number of session (see here). This means that if your app is the one that is used the most by users, each user is generating a new session. And if the app is computationally intensive, then some of the user sessions may be getting backlogged which might trigger the ERR_EMPTY_RESPONSE. You can fix this by using Docker to spin up a process for each user. Here are some options, I've found shinyproxy to be the most intuitive.