Odd issue with 1.6.1 (as opposed to 1.5.5)

29 views
Skip to first unread message

François Schiettecatte

unread,
Jan 21, 2014, 10:24:34 AM1/21/14
to django...@googlegroups.com
Hi

I am wondering if there is something about CONN_MAX_AGE in 1.6.1 and accessing objects from a script (as opposed to as part of an HTTP request).

I have set CONN_MAX_AGE to 60 (seconds) but I don't see the connection closing after that interval. In fact I am seeing the connection idle for more than 60 seconds (checking this in MySQL) and being reused by subsequent object accesses.

https://docs.djangoproject.com/en/1.6/ref/databases/#persistent-connections
https://docs.djangoproject.com/en/1.6/ref/settings/#std:setting-CONN_MAX_AGE

Am I missing something?

Cheers

François
signature.asc

bigjust

unread,
Jan 30, 2014, 12:45:01 AM1/30/14
to django...@googlegroups.com
François Schiettecatte <fschiet...@gmail.com> writes:

> Hi
>
> I am wondering if there is something about CONN_MAX_AGE in 1.6.1 and
> accessing objects from a script (as opposed to as part of an HTTP
> request).
>

The connection age check (and subsequent closing) is initiated only by a
signal being fired at the end of a request.

-- bigjust

bigjust

unread,
Jan 30, 2014, 12:43:22 AM1/30/14
to django...@googlegroups.com
François Schiettecatte <fschiet...@gmail.com> writes:

> Hi
>
> I am wondering if there is something about CONN_MAX_AGE in 1.6.1 and
> accessing objects from a script (as opposed to as part of an HTTP
> request).
>

Reply all
Reply to author
Forward
0 new messages