-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Huge amount of store_id access has been raised #1725
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
Comments
Yes, that's almost certainly related to #1685. I'm wondering what's happening here though. I don't see those repeated requests (obviously) and I also work with more or less the same software as you do. Not using axios, but React, Django etc. One hypothesis which comes to mind is that the toolbar may be loaded more than once and the window.fetch we're calling isn't actually the correct window.fetch but our own, so that we're looping infinitely? Or maybe React re-renders the toolbar because of the DOM change? (No idea why this would happen, though.) I assume that you're not using React to render the whole |
@matthiask Thank you for replay! Humm, minimum code(below) did not reproduced. import axios from 'axios'
const Component = () => {
axios.get('/api/me/') // Just get profile from Django app's endppint
return <div>foo</div>
}
const App = () => (
<Component />
)
render(<App />, document.getElementById('app')) urlpatterns = [
path(
'foo',
TemplateView.as_view(template_name='a.html'),
name='foo',
),
] {% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>sample</title>
<script defer src="{% static 'app.js' %}"></script>
</head>
<body>
<div id="app"></div>
</body>
</html> app.js is hole React SPA application(build by webpack) I don't have enough time to investigate this now. It would be very happy if you could find out anything. Thank you. |
@heavenshell when investigating it, keep in mind the toolbar does this patching to detect when an ajax request is made. |
Just to show support, I am also having this issue with 3.8.1. It is happening on DRF views and drf-yasg (swagger/redoc) views - basically all the django html views that show the toolbar. My settings are: DEBUG_TOOLBAR_PANELS = [
'debug_toolbar.panels.history.HistoryPanel',
'debug_toolbar.panels.versions.VersionsPanel',
'debug_toolbar.panels.timer.TimerPanel',
'debug_toolbar.panels.settings.SettingsPanel',
'debug_toolbar.panels.headers.HeadersPanel',
'debug_toolbar.panels.request.RequestPanel',
'debug_toolbar.panels.sql.SQLPanel',
'debug_toolbar.panels.staticfiles.StaticFilesPanel',
'debug_toolbar.panels.templates.TemplatesPanel',
'debug_toolbar.panels.cache.CachePanel',
'debug_toolbar.panels.signals.SignalsPanel',
'debug_toolbar.panels.logging.LoggingPanel',
'debug_toolbar.panels.redirects.RedirectsPanel',
'debug_toolbar.panels.profiling.ProfilingPanel',
]
MIDDLEWARE = MIDDLEWARE + [
"debug_toolbar.middleware.DebugToolbarMiddleware",
]
INSTALLED_APPS = DEFAULT_APPS + ['debug_toolbar'] |
@skamansam it should be possible over set the |
FYI |
@heavenshell I'm going to close this until there's a reproducible example. |
Hello. Thank you for great works.
I've update to v3.8.1 and found some issue.
When I access to SPA page, which access to server api using axios,
huge amount of access(*) was recorded and Debug toolbar does not show any panel.
*
http://localhost:8000/__debug__/history_sidebar/?store_id=03b13fc6002f4d11abd19ca4de7cb732
)Not SPA page(maybe not access to API server via JavaScript), does not happen.
Dose anyone else experienced the same problem?
v3.8.1
v3.8.1.mp4
v3.7.0 works fine.
v3.7.0.mp4
I think this PR #1685 was releated.
OS: macOS X
Django: 3.2.16
React: 17.0.2
axios: 0.27.2
Best regards.
The text was updated successfully, but these errors were encountered: