Closed SanderDevisscher closed 2 months ago
Googling the issue led me to this https://github.com/openanalytics/shinyproxy/issues/222 🤔
@SanderDevisscher I can reproduce locally but only when inspecting (F12) the Network. Do you know whether this issue was also present in earlier versions of the app?
Hi Sander
When did this problem start occurring? E.g. did you first notice this after an update of the app?
In any case, this could be an issue in ShinyProxy, when a (relatively) big amount of data is send over the websocket connection, e.g. when having a lot of plots. The good news is that this has been fixed in ShinyProxy in 12/2020, but it seems that you are running a version of ShinyProxy released in 2019. So it could be worth trying to update and hopefully this is issue is then fixed.
@LEDfan There have been some issues with timeouts for some time now but I've just recently learned about chrome devtools which enabled me to detect the issue. @LEDfan can you take the necessary steps to update the shinyproxy ? If necessary please contact @TheJenne18 (Jens)! Since I have no access to the shinyproxy repository.
Okay, then I think it makes sense to try to update. I created a PR here: https://github.com/inbo/shinyproxy/pull/4 , this just a small upgrade, so not using the latest ShinyProxy release. But since I don't have access to AWS or really know how this deployment works, I cannot test or deploy the change. Let me know if you run into issues.
@TheJenne18 can you take a look at the PR from @LEDfan ? Maybe deploy it to the UAT first so I can check whether the issue persists.
For uat we use the following repo's where we use other shintyproxy versions: https://github.com/inbo/shinyproxy-wbe/blob/uat/install_shinyproxy.sh#L14 https://github.com/inbo/shinyproxyV3/blob/main/install_shinyproxy.sh#L13
@LEDfan can you check if the error also exists in these versions ? ifso can you fix it ?
@TheJenne18 do we use the same shinyproxies for the PRD ?
@SanderDevisscher what is the URL for the UAT version of this app?
faunabeheer-dev.inbo.be
Okay, I'm unable to reproduce it on https://faunabeheer-dev.inbo.be after numerous test. Which throttle settings do you use on faunabeheer-dev.inbo.be in order to reproduce the problem?
@LEDfan I'm currently also unable recreate the initial issue. However I'm experiencing a timeout on both UAT & PRD when using any throttle (fast 3G and slower). @mvarewyck initial loading goes fast and then it stalls on the first map & related graphs.
I do get these errors when loading faunabeheer.inbo.be using fast 3G throttle:
When loading faunabeheer-dev.inbo.be using fast 3G throttle I get:
both errors take a while to manifest.
hmm something strange is going on, 10min ago I was unable to recreate the issue. Now 20h43 after running it on my private account (without using devtools & no throttling) I get the error all the time on both private and work accounts. Clearing the cookies seems to fix the issue for a while.
For me, the PRD website works in Firefox but not in Chrome. Could the Websocket error be this issue? Is PRD running a different version of Shinyproxy than UAT (that could help me to understand why it doesn't fail on UAT)
@TheJenne18 can you answer @mvarewyck ?
For me, the PRD website works in Firefox but not in Chrome. Could the Websocket error be this issue? Is PRD running a different version of Shinyproxy than UAT (that could help me to understand why it doesn't fail on UAT)
@TheJenne18 tells me currently UAT is running v3 while PRD is still running v2.3
For me, the PRD website works in Firefox but not in Chrome. Could the Websocket error be this issue? Is PRD running a different version of Shinyproxy than UAT (that could help me to understand why it doesn't fail on UAT)
@TheJenne18 tells me currently UAT is running v3 while PRD is still running v2.3
This throttle issue was indeed fixed since ShinyProxy 2.4.2
@TheJenne18 is deploying shinyproxy 2.5.1. to PRD. Deploying to v3 is more complex.
@mvarewyck @LEDfan when looking at the waterfall on firefox1 I notice plotly-latest.min.js to be the largest time consumer (>1min). The app is also noticeably faster on firefox then chrome (where it still crashes when throttled).
1while loading v0.3.4. in PRD with shinyproxy v2.5.1 and throttled to "good 2G". "No throttle firefox": 388ms | "Good 3G firefox": 18s | "No throttle chrome": 678ms | "Fast 3G chrome": 23.5s causes timeout
To investigate: https://plotly-r.com/performance
@mvarewyck @LEDfan when looking at the waterfall on firefox1 I notice plotly-latest.min.js to be the largest time consumer (>1min). The app is also noticeably faster on firefox then chrome (where it still crashes when throttled).
I throttled the app on Chrome, but didn't result in a timeout. Wrt plotly-latest.min.js it is a file that is served from local server: clicking on the file we can see the source is localhost.
plotl_ly() %>% partial_bundle()
which has smaller js files but downloads it from CDN by default. I would need to find a hack which might only work locally and not on shinyproxy.toWebGL()
but that didn't improve time and memory usage.@SanderDevisscher Do you think we should further investigate on this or wait for the restructuring
@mvarewyck I got news the app now loads even with less favorable internet connections. So I would suggest waiting until after the restructure.
Describe the bug When starting the app on PRD while viewing it using devtools I see the following error:
it refers to this line of code in shinyapp.js:
To Reproduce Steps to reproduce the behavior:
Expected behavior App loads without errors nor timeouts
Screenshots
Additional context Deployment on UAT and PRD with the same hash works just fine when the internet connection is not throttled. Whenever the connection gets throttled ea 'fast 3G' the error occurs. If needed, because of issues with shinyproxy, please include Tobia!
Please give me a signal when you did your investigations so I can ask to revert to the previous hash.
Git SHA (after 0.3.1) 253e3d65227d4da71cb306553e5c2eb126dbf1d0