I'd second Simon's proposal. People often develop their projects on
production servers and need to have debug on. Having to manually flush
the query log disrupts their normal workflow. I'd suggest being kind
to the users and not work against their intuition by default. As Simon
proposed, whoever needs the full query log should be able to switch it
on with DEBUG_SQL_LOG_LIMIT = 0.

References:
 * http://code.djangoproject.com/ticket/6734
 * http://code.djangoproject.com/ticket/3711
 * 
http://blog.redinnovation.com/2008/03/07/debugging-django-memory-leak-with-trackrefs-and-guppy/

Regards,
MS

On Apr 19, 12:18 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On Sat, Apr 19, 2008 at 2:37 AM, Simon Willison <[EMAIL PROTECTED]> wrote:
> >  I've noticed that a LOT of people get bitten by the problem where
> >  every SQL statement is logged if DEBUG=True, resulting in huge memory
> >  consumption after a while. This problem seems particularly common for
> >  import scripts, which are often run in development (hence with DEBUG
> >  on) and can involve thousands of queries.
>
> The flip side of the argument, though, is that it means someone who
> leaves DEBUG=True on a live deployment will very quickly have a
> noticeable problem, and that's a useful behavior.
>
> --
> "Bureaucrat Conrad, you are technically correct -- the best kind of correct."
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to