Django-debug-toolbar: Data for this panel isn't available anymore. Please reload the page and retry.

Created on 16 Sep 2015  ·  16Comments  ·  Source: jazzband/django-debug-toolbar

Hello, I'm getting the following message in some pages:

Data for this panel isn't available anymore. Please reload the page and retry.

I tried updating to the latest version (1.3.2), but still get the same message. It's really strange that for some pages works fine and for others not. Any ideas?

Thanks

Most helpful comment

The toolbar keeps track of recent queries where it was inserted, by default the last 10. If you make more than 10 queries where the toolbar is inserted between the initial page load and the moment you open the panel, that would explain the behavior you're seeing.

Increasing RESULTS_CACHE_SIZE may help. See
http://django-debug-toolbar.readthedocs.org/en/latest/configuration.html#debug-toolbar-config.

All 16 comments

Is runserver restarting between loading the initial page and using the
toolbar?

No, it isn't. For example in the home page the toolbar doesn't work. So if after fully loading the page I click the icon to show the toolbar and then click for example in the SQL tab, I can only see 1 request made in the runserver logs. See below the latest 2 requests I get in the runserver logs:

"GET /static/images/favicon.ico HTTP/1.1" 200 8348
"GET /__debug__/render_panel/?store_id=dc4583336c2a44aa82c51a0536048b62&panel_id=SQLPanel HTTP/1.1" 200 89

Here you can see the logs I get in a page where the toolbar works fine:

"GET /__debug__/render_panel/?store_id=f49ad04e543c4ece912bcdb2d50885b2&panel_id=SQLPanel HTTP/1.1" 200 141066
"GET /static/toolbar/debug_toolbar/js/toolbar.sql.js?_=1442403893082 HTTP/1.1" 200 353

I'll set if I can reproduce it, but I'll likely need more information about
your project and view.

Maybe some missing static resource is affecting the toolbar? It's a bit weird, because sometimes it doesn't work in the pages where it used to work fine, but after some reloadings, then it works again.

All the pages usually have some missing static resources, like images, because I don't have them in my local machine. I can also see some javascript exceptions in the browser console. But they are also in the pages where the toolbar works fine...

It'd be very helpful if you could create a small sample project that was having the same issue.

I don't think I can replicate the same environment I have in the current project, since it is a bit complex and big. I guess it's something related to the front-end, since I can open Debug Toolbar, and even works fine in some pages. Although sometimes it doesn't work in those same pages...

The toolbar keeps track of recent queries where it was inserted, by default the last 10. If you make more than 10 queries where the toolbar is inserted between the initial page load and the moment you open the panel, that would explain the behavior you're seeing.

Increasing RESULTS_CACHE_SIZE may help. See
http://django-debug-toolbar.readthedocs.org/en/latest/configuration.html#debug-toolbar-config.

@aaugustin Forgot to say thanks. Increasing RESULTS_CACHE_SIZE to 100 solved the problem.

Yes. Increasing RESULTS_CACHE_SIZE solve my problem also.

For anyone else coming to this, for whom increasing RESULTS_CACHE_SIZE doesn't work...

I'm using gunicorn and had its NUM_WORKERS set to 1. Increasing it to 2 (or more) fixed this problem.

@philgyford thank you very much. Works! (the NUM_WORKERS)

I have done all of the above, and I am still getting this same error message. I am using uWSGI, and increased the number of workers to 2. I also increased the RESULTS_CACHE_SIZE to 100. (I've also tried much higher values)

I'm using Django 1.11.3.
I am able to see the SQL panel is trying to get ~742queries, but I would like to see what these are.

I had this problem BECAUSE I had more than one worker, a worker without knowledge of my history was getting the requests - hence I tried RENDER_PANELS=True but that had no effect.

All my debug-toolbar issues went away when I switched to gunicorn --workers 1 and increased RESULTS_CACHE_SIZE to a more sensible value. :)

I just came across this problem and solved flushing the redis cache ("redis-cli flushall").

I'm running into this issue with the development server (manage.py runserver) and no refresh in-between.

Was this page helpful?
0 / 5 - 0 ratings