{{{
try:
record = record_class.objects.get(**filter_params)
except record_class.MultipleObjectsReturned:
# deal with multiple records
}}}
Most names are single objects, but occasionally a name like 'not provided'
will come through and return 1,000 results or more. In that instance,
record_class.objects.get(**filter_params) spikes in memory usage from 56mb
to 344mb. On Heroku, running this query a few times quickly maxes out all
available memory, and the app stays that way until the dynos are
restarted.
--
Ticket URL: <https://code.djangoproject.com/ticket/29117>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by Tim Graham):
I guess that could be solved by #6785. Do you have another proposal?
--
Ticket URL: <https://code.djangoproject.com/ticket/29117#comment:1>
* status: new => closed
* resolution: => duplicate
--
Ticket URL: <https://code.djangoproject.com/ticket/29117#comment:2>