dash icon indicating copy to clipboard operation
dash copied to clipboard

[BUG] Callback will not render new data until a delay is introduced

Open iamzoltan opened this issue 1 year ago • 6 comments

Context Plotly, gunicorn, nginx, redis cache

dash                      2.15.0
dash-auth                 2.0.0
dash-bootstrap-components 1.5.0
dash-core-components      2.0.0
dash-html-components      2.0.0
dash-mantine-components   0.12.1
dash-table                5.0.0

Description

I have roughly 15 graphs that use the same signal as input. All of them update as expected, except for one. This one will not update regularly, but will occasionally update. I checked all the data coming into the callback from the cache, and everything is changing as expected, but the graph still does not update. I then decided to try adding a small delay in the callback, after the data was loaded, and that seemed to fix the issue. I know this is not the best solution, but I can't seem to figure out any other way. I even tried to force the frontend to update.

Expected behavior

I expected that the graph would update and render the new data that is coming in.

Any wisdom or advice on the matter is much appreciated.

Thanks for you time!

iamzoltan avatar Feb 18 '24 01:02 iamzoltan

@iamzoltan Can you provide code to reproduce the problem.

CNFeffery avatar Feb 18 '24 03:02 CNFeffery

@CNFeffery Do you mean for the unchanging callback?

iamzoltan avatar Feb 20 '24 17:02 iamzoltan

@iamzoltan the entire app - ideally simplified to the smallest example that recreates the problem. In order to investigate this bug someone else will need to be able to run code that shows the problem.

alexcjohnson avatar Feb 27 '24 02:02 alexcjohnson

@alexcjohnson I see, I will have to check on that. If there anything I can run to provide you with more information?

iamzoltan avatar Feb 27 '24 17:02 iamzoltan

This sounds like a very deep issue - a race condition or some such... which means it's very hard to guess where the root cause lies so debugging really needs a live environment and access to modify the source code. All that to say extra information that's NOT a runnable example is unlikely to be helpful, I'm afraid.

alexcjohnson avatar Feb 27 '24 19:02 alexcjohnson

Alright, I will see if I can send you the code base with some fake data.

iamzoltan avatar Feb 28 '24 18:02 iamzoltan

Closing for now as we can't tackle this without a reproducible example (reprex) - if you're able to provide one, please re-open.

gvwilson avatar May 31 '24 20:05 gvwilson