#21231: Limiting the number of variables and files that a POST request can 
contain
-------------------------------+--------------------------------------
     Reporter:  epandurski@…   |                    Owner:  nobody
         Type:  New feature    |                   Status:  closed
    Component:  HTTP handling  |                  Version:  master
     Severity:  Normal         |               Resolution:  wontfix
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------
Changes (by aaugustin):

 * status:  new => closed
 * needs_better_patch:   => 0
 * resolution:   => wontfix
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 > one should be able to asses what will be *the absolute maximum* of
 memory consumed by each serving process/thread.

 I'm sorry, but I fail to see how this could be achieved in Python. Memory
 use will grow until the GC kicks in, and that isn't under your control.

 > A single 1MB POST request may require *much* more that 1MB to process

 POST data is a rather small part of the memory footprint of a standard
 Django application. It isn't unusal to allocate 100MB or 200MB of RAM per
 process in a Django application server.

 Your proposal doesn't appear to be predicated on a very good understanding
 of memory management in Python and memory use in Django applications; I'm
 not convinced it has enough value to warrant introducing two settings.

 Besides, Django doesn't provide a production-grade application server, and
 doesn't plan to (see the docs for runserver). The common way to avoid
 excessive memory usage is to have the application server manage it,
 generally by killing processes that exceed a given threshold.

 If you want to discuss possible ways to restrict memory use in Django, I
 suggest starting a discussion on the django-developers mailing-list. Thank
 you.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21231#comment:1>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/078.892dee95a8f7c6d6b9c53f45e6d26f16%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to