Hi Patryk,

This was done to make Django faster, so it doesn't create connection
to database every time new SQL is executed.
Do you mean you wanted to set up timeouts for idle database connections?
I guess, nobody asked this before.

On Mon, Sep 6, 2010 at 5:20 PM, Patryk Zawadzki <pat...@pld-linux.org> wrote:
> On Mon, Sep 6, 2010 at 11:20 AM, Kirit Sælensminde (kayess)
> <kirit.saelensmi...@gmail.com> wrote:
>> Strange. We use Postgres and don't see any problem with this. We do
>> encounter complications occasionally with the lack of composition of
>> Django transaction handling, but other than that find the transaction
>> handling adequate.
>>
>> Are you actually using transactions in your code? You need to be. The
>> transaction middleware does a good enough job for most things, but for
>> external processing you will need to carefully design your transaction
>> handling. With the transaction middleware we see fully isolated
>> updates until the transaction is committed using psycopg2.
>
> I'm not sure you understand the problem at all. The problem is not
> lack of the isolation. The problem is permanent isolation. The
> isolating transaction is never terminated, thus remaining alive for
> indefinite amounts of time.
>
> You can check this by creating a fresh project using psycopg2 and
> creating a model. Then write a view that queries the database and
> invoke it. Now, leaving the server running, open up your database
> shell. The pg_stat_activity table will report "<IDLE> in transaction"
> for hours.
>
> BTW: This has nothing to do with Django transactions or TransactionMiddleware.
>
> --
> Patryk Zawadzki
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django developers" group.
> To post to this group, send email to django-develop...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-developers+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-developers?hl=en.
>
>



-- 
Best regards, Yuri V. Baburov, ICQ# 99934676, Skype: yuri.baburov,
MSN: bu...@live.com

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

Reply via email to