2009/6/25 Andrew Fong <fongand...@gmail.com>:
>
> To clarify, you're displaying a list of 1000+ models on a single page,
> yes?
>

Yes, i will change that as soon as I could.

> My understanding is that the debug_toolbar analyzes each SQL query and
> keeps each result in memory before rendering everything in the
> template. I don't know how your query works, but let's take an extreme
> case and say your request executes 1000+ queries. In addition to
> keeping 1000 models in memory, the debug_toolbar now has to also
> contain the query data for 1000 queries. If you have a small amount of
> memory, this could eat it up pretty quick.
>

I understand that. But, what's bother me is that this very same list
have worked well before (with an average of two seconds of loading) on
the same server.
Indeed when I has activated debug_toolbar on my PC, lists were very
slow to display (about ten seconds and more) but there was not a
Memory error.

My validation server is virtualized. I will see with my admin the
amount of memory on it.

> I don't think setting MaxRequestsPerChild = 1 would do anything to
> cause a MemoryError. It should actually help, since if you're
> restarting the process after just 1 request, any memory leaks won't
> have time to build up.
No, indeed. A MaxRequestPerChild set to 10000 don't change anything


Many thanks for your reply,

>
> -- Andrew
>

Frédéric

> On Jun 25, 1:15 pm, Frédéric Hébert <fg.heb...@gmail.com> wrote:
>> Hi there,
>>
>>  I'm facing with a curious problem.
>>
>>  I've an project which is hosted on three differents servers :
>>
>>  one (my local PC) :
>> debian lenny /
>> python 2.5.2 / django 1.0.2 final
>> apache 2.2.9 / mod_python 3.3.1-7
>>
>>  the two others (production and validation server) :
>> OpenSUSE 11.1 /
>> python 2.6.2 / django 1.0.2 final
>> apache 2.2.10 / mod_python 3.3.x-x
>>
>>  Two months ago, I've launched this project both on production server
>> and validation server.
>>  Neither validation server nor production server caused me any
>> trouble.
>>
>> Today, to test something, I've installed debug_toolbar extension and
>> set MaxRequestPerChild to 1 in Apache's conf file, both on my local
>> dev PC and on the validation server.
>>
>> When I want to display two long list (1000+ items each) i get a
>> MemoryError one time out of two. The remainder of project goes fine.
>>
>>  I've resetted MaxRequestPerChild to 10000 (default value on OpenSUSE)
>> and commented out debug_toolbar's things in my settings, restart
>> Apache. But error happened again on the validation server.
>>
>>  On my local PC, it works well, with debug_toolbar and MaxReq.. set or
>> not.
>>
>> I've pasted the traceback  herehttp://dpaste.com/hold/59667/
>>
>>  AFAICS, an exception occurs when django tries to render a debug
>> template
>>
>> Here is an exerpt of my vhost conf file on OpenSUSE :
>>  DocumentRoot /srv/www/enseignements-dev.ehess.fr/ue
>>
>>     <Location "/">
>>       SetHandler python-program
>>       PythonHandler django.core.handlers.modpython
>>       SetEnv DJANGO_SETTINGS_MODULE ue.settings_dev
>>       PythonDebug On
>>       PythonPath "['/srv/www/enseignements-dev.ehess.fr/', '/srv/www/
>> enseignements-dev.ehess.fr/ue/'] + sys.path"
>>     </Location>
>>
>> Many thanks in advance,
>>
>>  Frédéric
> >
>



-- 
http://www.openidfrance.fr/fhebert

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to