Error Unable to connect to worker after 60.00 seconds; startup took too long.

I have a shiny app that works locally but does take a long time to get started - longer than 60 seconds. On this leads to the error

Unable to connect to worker after 60.00 seconds; startup took too long.

The logs are all ok, they show that, yeah, it's taking a long time to start up. What is the minimum plan I need in order to let it load for as long as it needs to so it can be called by a user? It's for a school project, so it won't get that much traffic, I just need it to run.

Before attempting to upgrade plans, I recommend you profile your app, to understand why it is slow to start. If you can alter it to start faster, I'm sure the future users of the app will appreciate it too.
profvis can be useful for this sort of activity.

Paste the code as shown- use<> for script tags , as showed in the screen shot.

ui<- fluidPage(
var socket_timeout_interval
var n = 0
(document).on('shiny:connected', function(event) { socket_timeout_interval = setInterval(function(){ Shiny.onInputChange('count', n++) }, 3000) }); (document).on('shiny:disconnected', function(event) {


Thanks for the quick replies! I ended up using nirgrahamuk's advice: I refactored and serialized all the incoming data and models. This way, the app is now super fast and works like a charm!

1 Like

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.