0

The app works fine locally and is basically just for plotting data - very little to no math/processing is going on. The Shiny input fields just filter a data.frame by date and a handful of other attributes like location, observation type, etc. -- for daily numerical values originating in .csv that go back to Oct '16 that amount to a seemingly manageable ~0.25 gb. The default begin and end dates for the filtering are both in April '19, and the online app filters (by filter()) and plots that about month of data correctly on start up, and works fine looking back several days or weeks too.

However, if I extend the start date back by multiple months or years (say for example 10/15/16 to now instead of just the past month), the io version pretty abruptly yields "disconnected from the server". It seems I need to relax a setting or devote more resources to something else, but just a guess.. any ideas?

If feeling extremely helpful or curious - here's the working app in one ~40 mb zipped folder along with the app.r, and all the data, and the libraries used specified in libs.r

timeseries app

in summary the app works fine locally, but only for short time series ranges in io. The full data set goes back to 2004 for ~2gb. Ideally I'd like to find a way to have all those years queryable from the io app with decent app performance.

dbo
  • 1,174
  • 1
  • 11
  • 19
  • 1
    We cannot help unless we know more about the app. Please make this question *reproducible*. This includes sample code (including listing non-base R packages), sample data (e.g., `dput(head(x))`), and expected output. Refs: https://stackoverflow.com/questions/5963269, https://stackoverflow.com/help/mcve, and https://stackoverflow.com/tags/r/info. – r2evans Apr 22 '19 at 19:03
  • Every question needs code? It makes sense to me that some questions could be just conceptual and without code. When I reduce the data to a commonly shareable size, the online Shiny app doesn't fail. I think it might be because of the querying of a .csv that's taking too long for a Shiny default setting, in other words because the query is talking too long without a response, Shiny quits? I was hoping there might be something along the lines of adding to the default time that Shiny waits for an action to complete. – dbo Apr 23 '19 at 19:35
  • 2
    If the error appears As the selected data grows larger I would have to assume the issue is due to system resources. – Wil Apr 23 '19 at 19:48
  • @Wil I've bumped up some allowances through the online io account/app page (w/ a starter account, not sure this is accessible with the free version), but still get the same. I've noticed that the "disconnected from server" happens after just about a second or two after trying an older date, so more accurately than I said above, it's as if right away somehow Shiny considers the task too much or too hard, as opposed to it being half way done and not able to wait any longer. So it seems I need more of something. – dbo Apr 23 '19 at 23:09
  • Is the entire csv read in at startup? – Wil Apr 23 '19 at 23:27
  • @Wil, yep. Its 6 columns all read in as a first step, then a couple more columns added to the df outside of the ui and server blocks. – dbo Apr 23 '19 at 23:36
  • doconner, sure, not every question needs code. Many questions can be concepts-only. In this case, however, my only answer is *"it depends on many factors"*, many of which originate in the code and can be suggested or even troubleshot on inspection of the code. In my limited experience on SO, most questions like this are resolvable either (a) with the code, or (b) with somebody who found an ancillary problem such as server resources. If you are confident that it is not in the code, I hope somebody with more experience in io can help. – r2evans Apr 24 '19 at 00:19
  • r2evans, ok great, I see. thanks. I may be wrong but I'm convinced it's on the server side somewhere. – dbo Apr 24 '19 at 01:25
  • @doconnor have you read this? https://docs.rstudio.com/shinyapps.io/Troubleshooting.html#disconnected-from-server-messages – Wil Apr 24 '19 at 14:40
  • Wil, thank you. I did see that. Everything is in one folder so no need to change directories, no databases to connect to, and as far as I can tell none of the other aspects would apply. B/c it works except for long timeseries lengths, it makes me think it's a resource thing. – dbo Apr 24 '19 at 14:45
  • I think I may have fixed it. Even though the .csv is ~0.25 gb, I changed the instance memory size to xxlarge (4gb) and so far so good. – dbo Apr 24 '19 at 15:13

0 Answers0