Opened 11 months ago
Closed 11 months ago
#35120 closed Bug (needsinfo)
Stack overflow in render method when many instances of included template
Reported by: | Morgan10E | Owned by: | nobody |
---|---|---|---|
Component: | Template system | Version: | 4.1 |
Severity: | Normal | Keywords: | render template include |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
To reproduce behavior:
- Create a base template
- Create a template to include. It does not matter what the contents are
- Force included template to be included thousands of times
- See "error_no_response" on client
On the server, we were able to observe through print statements that everything up to the render call was executing as expected. However, there was no error to indicate what might be going wrong. We narrowed down the likely culprit to stack overflow via the following observations:
- If you put the contents of the included template directly in the base template, the issue does not occur and the page renders as expected
- If you reduce the number of instances of the include, the issue does not occur and the page renders as expected
The desired behavior would be to at least surface some type of actionable error message.
Note:
See TracTickets
for help on using tickets.
Hi, I don't think you've explained the issue in enough detail to confirm a bug in Django. Please reopen the ticket if you can debug your issue and provide details about why and where Django is at fault. A sample project that reproduces the issue may also be helpful.
Are you doing experiments? or this is a real-life scenario.