If you are seeing issues with your apps in Shiny Server Pro, the following information may be helpful:
"Disconnected from server" messages
Whenever this happens, we'd recommend starting by checking the application logs and the browser console to see if there are any errors in your code.
Even if there is no error in the application log or browser console, the problem may still lie within the application code. There are many resources available online to assist you in debugging and optimizing your app, including our Debugging Shiny Applications article, and the shiny-discuss Google group. Make sure that the app runs correctly locally, outside of Shiny Server.
Of course, an app may run well locally, but fail on Shiny Server. This could happen for a variety of reasons, including but not limited to:
- Missing packages or incorrect package versions on the server - make sure that the server has the necessary packages installed for the code you're running and that the versions match the versions you're running locally.
- Environment variables differing between your local setup and your server
- The application timeouts not being set correctly - see here for more.
- Forgetting to close each database connection after loading in data (the connection limit may be hit)
- Making multiple long-running calls to a public API (the API request limit may be hit)
- Sub-optimal application instance or worker provisioning (you may need to tweak your scheduler settings (https://support.rstudio.com/hc/en-us/articles/220546267)
Finally, note that applications will disconnect if not interacted with for too long based on your
app_session_timeout setting. See here for more on this and how to configure it.
If you are seeing performance errors with your applications, we'd recommend tweaking the utilization scheduler based on your needs. See our article here for more.