Cannot read property 'connections' of null

Has anyone experienced and found a solution to this problem?

upload new version of app. (n.b. i have appdir therefore other apps are not affected.);
restart shiny-server;
access any app without success, the computer says no:

An error has occurred
Invalid application configuraion.
Cannot read property 'connections' of null

a few minutes later without doing anything, the computer says yes and all apps are working fine.

server config:

# Instruct Shiny Server to run applications as the user "shiny"
run_as peter;
# run_as shiny;
# Specify the authentication method to be used.
# Initially, a flat-file database stored at the path below.
# auth_passwd_file /etc/shiny-server/passwd;

rrd_disabled;
# set_header "Strict-Transport-Security" "max-age=36000";
set_header "X-XSS-Protection" "0";
set_header "X-Frame-Options" "ALLOW-FROM http://10.242.1.128";
# Define a server that listens on port 3838
server {
  listen 3838;
  ssl /etc/shiny-server/server.key /etc/shiny-server/server.cert;
  # Define a location at the base URL
  location / {

    # Only up tp 20 connections per Shiny process and at most 3 Shiny processes
    # per application. Proactively spawn a new process when our processes reach
    # 90% capacity.
    utilization_scheduler 20 .9 3;

    # Host the directory of Shiny Apps stored in this directory
    # site_dir /srv/shiny-server;
    # site_dir /home/peter/R/shiny-apps;
    site_dir /app/R/shiny-apps;
    # Log all Shiny output to files in this directory
    log_dir /var/log/shiny-server;

    # When a user visits the base URL rather than a particular application,
    # an index of the applications available in this directory will be shown.
    directory_index on;
    sanitize_errors false;
    frame_options allow;
    }
}

server {
  listen 80;
  #ssl /etc/shiny-server/server.key /etc/shiny-server/server.cert;
  location / {
  utilization_scheduler 20 .9 3;
  site_dir /app/R/shiny-apps;
  log_dir /var/log/shiny-server;
  directory_index on;
  sanitize_errors false;
  frame_options allow;
  }
}

Hi @SirWries, if you are using the commercial product, Shiny Server Pro, you should also be able to send this question to our support team by email you question to support@rstudio.com