If your facing problem in keep running shiny server for long time , I have a solution . 

The Problem: 

  • Shiny server need server restart
  • Shiny server not responding after sometime

    The Solution:  

Increase the RAM size
Ping server at regular interval
Increase app_idle_timeout in Shiny Server Conf
Use systemd to automatically restart shiny server

How to automatically ping your server at regular interval 

Your can add a cronjob to curl the index page of your application

Edit the crontask using crontab -e  . Schedule to run every minute 
* * * * * curl url_to_your_shiny_application

How to increase app_idle_timeout 
On unix system, your can find the configuration file for shiny server at /etc/shiny-server directory

In case of any problem, please ask in comment and solution will be updated 

You can start,stop,restart and check for status of shiny-server through these easy commands

sudo systemctl start shiny-server #to start it
sudo systemctl stop shiny-server # to stop it
sudo systemctl restart shiny-server # to restart 
sudo systemctl status shiny-server  # to know status of shiny-server

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.