Shiny app is failing at the startup within 60 secs while app_init_timeout is set to 300 in shiny server config

I have a shiny application hosted on Shiny Server commercial which loads a huge database which is in .Rdata format from global.R and my application is failing to load at the first go as it throws 504 error as below and if we refresh the app, it successfully loads.

504 error
image

I have set "app_init_timeout 300;" in shiny config but the application fails well before that time, infact in less than 60 seconds the app fails with the above error.

Does the app_init_timeout really work in my case or is there any other way that i can get this to work.

Also a lot of the application logs has this on the last line when the app failed to start

/opt/shiny-server/scripts/shiny-run: line 3: 27548 Terminated /bin/bash --login -c "$SHINY_EXEC_COMMAND SHINY_R_PATH *"

Please Help

system('shiny-server --version', intern = TRUE); "Shiny Server (Commercial) v1.5.2.764" "Node.js v6.9.1"

Also i'm not sure if the version above is actally a PRO or not, and can someone let me know how to confirm that.

I have a shiny application hosted on Shiny Server commercial which was working fine but now the app loads a huge database which is in .Rdata format from global.R and my application is failing to load at the first go as it throws 504 error as below and if we refresh the app now, it successfully loads.

[504 error]
image

I have set "app_init_timeout 300;" in shiny config but the application fails well before that time, infact in less than 60 seconds the app fails with the above error.

Does the app_init_timeout really work in my case or is there any other way that i can get this to work. below shows my shiny-config

run_as :AUTH_USER:;
app_init_timeout 300;
#app_idle_timeout 300;

access_log /var/log/shiny-server/access.log default;
preserve_logs true;

Specify the authentication method to be used.

Initially, a flat-file database stored at the path below.

auth_pam true;

Define a server that listens on port 3838

server {
listen 3838 127.0.0.1;

location patient {
app_dir /srv/shiny-server/patient;
log_dir /var/log/shiny-server/usersapp;

utilization_scheduler 20 0.9 3;

utilization_scheduler 5 0.5 3;
directory_index on;

required_user *;

required_group gbl-ap-iku-prod_rshinyuser gbl-ap-ikv-pe_RU gbl-ap-ikv-pe_AA gbl-ap-ikv-pe_SU;
}

Also a lot of the application logs has this on the last line when the app failed to start

/opt/shiny-server/scripts/shiny-run: line 3: 27548 Terminated /bin/bash --login -c "$SHINY_EXEC_COMMAND SHINY_R_PATH *"

And is there a way to confirm if i have Shiny Server Pro version?
system('shiny-server --version', intern = TRUE); "Shiny Server (Commercial) v1.5.2.764" "Node.js v6.9.1"

Please help me.