Malcolm Tredinnick wrote: > One other thing that I forgot in my earlier email: it's not actually > clear why the database connections get "lost" in the current > implementation. We close the connection too early, but when the template > rendering needs to access the database, it just opens a new one (that is > why everybody is seeing more opens than closes). However, the next time > that thread or process is used, Django should be reusing the same > connection, since it will still be open and we check for an existing > connection before opening a new one.
In case of threads the old thread's connection can't be reused because it is stored in thread.local() and a new thread is new thread. This ad-hoc 'pooling' actually never worked AFAIR... And I suspect that at least under Apache every new request results in a new Python thread both with prefork and worker mpms. --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---