Shiny app works locally, fails on deploy with useless error messages

1,978 views
Skip to first unread message

tommy...@unbounce.com

unread,
Apr 7, 2016, 2:36:27 PM4/7/16
to ShinyApps Users
I have an app that works perfectly locally but when I deploy just says:

An error has occurred

The application failed to start.


and there are no logs available, so I can't debug. I've taken out nearly everything and it still fails. Not sure how to proceed here, any suggestions?

Tareef Kawaf

unread,
Apr 7, 2016, 2:52:33 PM4/7/16
to Tommy Levi, ShinyApps Users
Can you include a link to your application please?  I am presuming that you see no logs when you run: rsconnect::showLogs()



--
You received this message because you are subscribed to the Google Groups "ShinyApps Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shinyapps-use...@googlegroups.com.
To post to this group, send email to shinyap...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shinyapps-users/523547d3-6343-45b1-b313-038467fb06a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Andy Kipp

unread,
Apr 7, 2016, 3:16:46 PM4/7/16
to Tommy Levi, Tareef Kawaf, ShinyApps Users
This is probably related to startup timeout. If you're loading lots of data outside shinyServer() function or in your global.R, you can get this error if that operation takes longer then 60 seconds. You can adjust the startup timeout in the advance settings page for your application in the shinyapps.io dashboard.


-Andy

On Thu, Apr 7, 2016 at 2:56 PM, Tommy Levi <tommy...@unbounce.com> wrote:
That is correct...

The link is:


when I run that command I get:

 rsconnect::showLogs()
Error in rsconnect::showLogs() : 
  No application found. Specify the application's directory, name, and/or associated account.




--
Thomas Levi
Director of Data Science

400-401 West Georgia St., Vancouver, BC

--
You received this message because you are subscribed to the Google Groups "ShinyApps Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shinyapps-use...@googlegroups.com.
To post to this group, send email to shinyap...@googlegroups.com.

Tommy Levi

unread,
Apr 7, 2016, 3:18:45 PM4/7/16
to Andy Kipp, Tareef Kawaf, ShinyApps Users
Unfortunately that did not solve the problem (I increased the load time to 300s). I'd also note that locally it loads quite fast.

Andy Kipp

unread,
Apr 7, 2016, 3:36:55 PM4/7/16
to Tommy Levi, Tareef Kawaf, ShinyApps Users
The other possibility is that you're exceeding memory limits (by default this is 1GB), which is casing your application to crash while its loading. If you're in the basic plan or above, you can increase the memory limit for your application by changing the instance size in the settings page for your application.

Tommy Levi

unread,
Apr 7, 2016, 3:41:05 PM4/7/16
to Andy Kipp, Tareef Kawaf, ShinyApps Users

I'm not, but how can I tell if that's the case?

Tommy Levi

unread,
Apr 7, 2016, 4:51:22 PM4/7/16
to Andy Kipp, Tareef Kawaf, ShinyApps Users
Looking at the performance charts on the web, the memory never goes above 150mb which is well below the 1gb limit I have set.

Andy Kipp

unread,
Apr 7, 2016, 5:07:12 PM4/7/16
to Tommy Levi, Tareef Kawaf, ShinyApps Users
Tommy,

I double checked our internal logs and I can confirm your application is being killed for exceeding memory usage. It's not being reflected in the graphs probably because its happening so quickly after startup. 

-Andy

Tommy Levi

unread,
Apr 7, 2016, 5:09:28 PM4/7/16
to Andy Kipp, Tareef Kawaf, ShinyApps Users
Awesome, that tells me how to debug it! Now I can go down the memory optimization rabbit hole as opposed to wondering at every line if double vs single quotes or some weird encoding error between OSX and Linux could be the issue.

Thanks a ton guys!

tommy...@unbounce.com

unread,
Apr 7, 2016, 5:12:22 PM4/7/16
to ShinyApps Users, tommy...@unbounce.com, tar...@rstudio.com
Awesome, that tells me how to debug it! Now I can go down the memory optimization rabbit hole as opposed to wondering at every line if double vs single quotes or some weird encoding error between OSX and Linux could be the issue.

Thanks a ton guys!

I guess this begats a feature suggestion whereby if that is the reason an application doesn't load the error message communicate that? It's very hard to tell (especially if you're already at the max size allowed in your tier) if that's the issue from the current reporting/logs.

tommy...@unbounce.com

unread,
Apr 7, 2016, 6:54:53 PM4/7/16
to ShinyApps Users, tommy...@unbounce.com, tar...@rstudio.com
I think there's something more going on here. I did these steps:

1. Took everything out of the original app except the slider and it still failed to load when deployed.
2. Copied that over to another directory and app, re-deployed and it ran fine.
3. Added all the original code back in (uncommenting basically) deployed and it ran fine.
4. Original project still failing with same error message.
5. Delete original project in shinyapps, redeploy and it works fine.

I don't really see how identical code, identical data (in rds files) can lead to completely different results so something must have been wrong with the project on the shinyapps.io end.

Tareef Kawaf

unread,
Apr 8, 2016, 1:28:03 AM4/8/16
to tommy...@unbounce.com, ShinyApps Users
If you can send me your application code.  I can try and see if I have the same issues locally and then on shinyapps.io.  
Reply all
Reply to author
Forward
0 new messages