Shiny Server : 502 Bad Gateway Error

Hello All

I am getting "502 Bad Gateway Error" on random basis for Shiny Application . Some time application able to get loaded and some time now .

Initial , two error was coming one is "The application took too long to respond" and second is 502 Gateway error on random basis .

I set below timeout value to twice then it's default i.e 120 & 10 sec . The error "The application took too long to respond" goes away now but 502 error appearing more frequently then before

          app_init_timeout
          app_idle_timeout 

Please suggested based on your uses of Shiny server .

Error something similar to : https://serverfault.com/questions/815060/intermittent-502-bad-gateway-on-nginx-shiny-server

Thanks