-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Busy indicators not working as expected on deployed shiny apps on subsequent runs #1373
Comments
What I'm seeing is that the If I manually add the |
Repros for me too. Here's a deployment with just one plot: https://jcheng.shinyapps.io/busy_indicators/ |
The right events are coming across the wire, and no reason to believe they're not being handled correctly by the client. But the timing seems off. Like all the messages are being batched up for some reason. |
Here's a Jam of just the refresh: https://jam.dev/c/92c69cc9-ac59-425e-9901-af540d2cf44d The messages all come in at the same time, after quite a delay. And here's what the server logged:
Note the 4-second delay between lines 4 and 5. (Also I'm not sure why the last line is another |
@kippandrew Is there someone on your team that can work with us to figure out why this is happening? The timing of messages being sent back from shinyapps.io is quite different than what we're seeing on Connect, Shiny Server, and raw Shiny for Python--almost like proxied responses are being batched up or blocking on something. This is preventing progress indication from working. Changing sockjs protocols doesn't fix it (I tried xhr-streaming and xhr-polling, both give the wrong behavior on shinyapps.io and both give the right behavior on Connect and SSOS). |
Very surprising: no repro on a similar app written in R https://nafcillincat.shinyapps.io/shiny_busy_indicators_R/ |
@ssinnott figured out how to repro without shinyapps.io, if you |
Actually |
Alright, the problem is that |
Here are two versions of a simple test app. The app-sync.py version repros the problem, the app-async.py version does not. The only difference is how they sleep--the sync version does a synchronous Maybe uvloop doesn't handle the task thread being blocked as well as asyncio does? I guess that would not be all that surprising given how async servers are usually implemented. |
Ok should be fixed - my busy indicator application looks happier: https://ssinnott2.shinyapps.io/busy_indicators/ Since this was caused by adding
|
Excellent!! Thanks @ssinnott! https://www.youtube.com/watch?v=ouwPYxS_T2s |
I ran the example app locally and all the spinners run during first load but also when I hit the
Re-render
button.When I deploy the same app to shinyapps.io, it shows all the spinners on first load, but does not show them when I hit the
Re-render
plan.To make sure the requirements.txt file has the latest version of shiny, I modified the
requirements.txt
file to look likeJam link with network and console tab - https://jam.dev/c/2cbd2d02-8a2f-4976-aa23-f56105fc2063
The text was updated successfully, but these errors were encountered: