Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Requests do not reliably execute on page load #24

Closed
mjclawar opened this issue Oct 4, 2017 · 5 comments
Closed

Requests do not reliably execute on page load #24

mjclawar opened this issue Oct 4, 2017 · 5 comments

Comments

@mjclawar
Copy link
Contributor

mjclawar commented Oct 4, 2017

Hey @chriddyp! So we're having a new issue with dash-renderer==0.11.0 that was not on older versions. I think this is related to plotly/dash#133 and #22.

We are trying to render something like 40 components on page load. However, only about 20 of them actually even make a request on page load for data.

Logic with 0.8.0

  • "All" components are dependent on pathname.
  • pathname is None, we throw a ValueError, and the request to /_dash-update-component returns a 500.
  • pathname then updates to /my/new/url/10, and requests to /_dash-update-component return the correct data based on the url.

This is good enough and works, although leaves an "Updating" in the browser title.

Logic with 0.11.0

  • "All" components are dependent on pathname
  • pathname is None, we throw a ValueError, and the first request to /_dash-update-component returns a 500. We noted that the first request is always the same, and always returns a 500.
  • pathname then updates to /my/new/url/10, and about 20 requests to /_dash-update-component return the correct data based on the url. We noted that these are always the same requests and always return the correct data.
  • The remaining ~ 20 requests do not even submit any requests to /_dash-update-component (confirmed by checking server logs to console and through the /_dash-update-component POST requests in the Chrome Developer Tools network panel). We noted that they are the same components every time we load the page.
  • This does not leave an "Updating" in the browser title, since dash-renderer thinks that all requests completed successfully.
  • Updating the pathname via inputs on the page functions as expected from this point forward.

Notes

If useful, I can try and make a dummy example of this. It does, however, based on previous issues and the change made for 0.11.0 seem to be related to the event scheduler (and the dummy example may have to be quite large to mimic this issue).
For now, we have to stay on older versions of dash-renderer since the behavior in 0.11.0 is not desirable.

@mjclawar
Copy link
Contributor Author

mjclawar commented Oct 4, 2017

Just checked on 0.9.0 and 0.10.0 and it has the same issues as 0.11.0. 0.8.0 is the last version to "work" for us. Any thoughts on what we might be doing wrong on this?

@chriddyp
Copy link
Member

chriddyp commented Oct 4, 2017

Hm.. I'm not sure what could be going on here. Could you create a reproducable example? I'll prioritize the fix once we can reliably reproduce.

@chriddyp
Copy link
Member

chriddyp commented Oct 4, 2017

(even if the reproducible example has like 50 inputs, it will still be helpful)

@mjclawar
Copy link
Contributor Author

mjclawar commented Oct 4, 2017

Looks like it was caused by this logic path: Dropdown (with no default) -> pathname -> other components. Still not sure why the behavior changed between 0.8.0 and 0.9.0, but we're going to implement it differently to avoid this issue.

On another note, I am able to get an unreliable example with anywhere between 20 and 50 inputs, but it only shows up sometimes. I have not been able to make a reliable example. For example, on one server run, the 2nd and 5th components of 30 may not update, and when restarting the server, they may all update. Seems like that may just be more of a server performance issue.

Probably reasonable to just close this.

@chriddyp
Copy link
Member

@mjclawar - I'll close this for now, but if you continue seeing it and can reproduce it, please re-open! Thanks :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants