Timeout on start up, failed to connect to database

My app connects to a remote MySQL database without any problems on shinyapps.io, however, after some unknown time span, the app does not start up anymore, sometimes with the error message that the connection to the database failed. Restarting the app on the shinyapps.io dashboard helps, for some time, until some time later, start up fails again due to time limitation.

The app runs without any problems on my machine. The database is tiny and no demanding computations are required upon start up. I use the R package RMySQL to connect to the database. My database is not restricted to specific IP addresses. I set the time limit for start up to the maximum value (300 seconds).

Any thoughts? Thank you for your replies.

Could you check what your app's logs say? Maybe it could give us a clue about what is going on.

Thank you for your reply. I have uploaded the app again and so far it is working without problems. No logs are written. I will post the logs as soon as the problem occurs again.

The app now fails to start up. The error message occurs in the browser "An error has occurred Unable to connect to worker after 60.00 seconds; startup took too long." As you can see, I had forgotten to set the start up time to 300 seconds again after re-uploading the app. It looks like the app is running but no logs are written.

I set the start up time limit to 300 seconds which involves stopping old and starting new instances. Now it works fine again. I will report once the app fails to restart after 300 seconds.

Now the app fails to start up. The following error message occurs in the browser window:

No logs are available. The status of the app is "Running" but it won't come up in the browser. The app runs without problems on my computer.

Edit:
Now, two hours later, it works again without problems. I have not changed anything.

I think this could be related to internet connectivity during peak hours due to people staying at home because of the COVID19. The slowdown could be happening at your SQL server or at the shinyapps.io servers (I think they are AWS servers).

Thank you for your reply. This suggests that the problems will disappear once COVID 19 has disappeared or the AWS servers have been upgraded. There is really nothing I can do about it. Unless anyone else has a different suggestion, this discussion could be closed then.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.