#34746: High CPU/memory consumption when a 5XX is raised with large local 
variables
-------------------------------------+-------------------------------------
     Reporter:  Rémi Dupré           |                    Owner:  Yash
         Type:                       |  Kumar Verma
  Cleanup/optimization               |                   Status:  assigned
    Component:  Error reporting      |                  Version:  4.2
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  1                    |  Patch needs improvement:  1
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Yash Kumar Verma):

 I was:
 * able to verify the following
     * when exception is raised after declaring a large variable, memory
 usage shoots up.
     * when exception is not raised after declaring a large variable,
 memory remains in live with normal operations.

 '''Setup I used to reproduce the error and suggested solution'''
 * added a middleware which logs the change in memory after each request.
 * created two views, one which throws error and one that does not.
 * observed the memory usage in both the cases.

 '''Current'''

 [[Image(https://github.com/YashKumarVerma/django-
 pocs/blob/master/poc01/poc01/2023-12-03-14-18-23.png?raw=true)]]

 '''After using reprlib'''

 [[Image(https://github.com/YashKumarVerma/django-
 pocs/blob/master/poc01/poc01/2023-12-03-14-35-23.png?raw=true)]]

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34746#comment:10>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018c2ef7f701-0963371c-e1a4-4cdd-b1b6-0235835b8837-000000%40eu-central-1.amazonses.com.

Reply via email to