Thursday, September 27, 2012

Re: Upgraded to Django 1.4.1 and now I have one database connection

On Wed, Sep 26, 2012 at 12:34 PM, Ricardo Grizonic
<ricardo.grizonic@gmail.com> wrote:
> Hey everyone,
>
> I recently upgraded from Django 1.3 to 1.4.1 and now it seems that for every
> new thread, a new database connection to postgresql is created. I'm using:
>
> from django.db import connection
>
> which, according to the docs, should get a global connection that would be
> used by all the threads. Anything I might be doing wrong?
>
> Thanks, in advance, for you help!
>

I think you are misreading the docs. Each thread or process has its
own database connection.

Cheers

Tom

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment