Odd issue with 1.6.1 (as opposed to 1.5.5)

已查看 29 次
跳至第一个未读帖子

François Schiettecatte

未读,
2014年1月21日 10:24:342014/1/21
收件人 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

未读,
2014年1月30日 00:45:012014/1/30
收件人 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

未读,
2014年1月30日 00:43:222014/1/30
收件人 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).
>

回复全部
回复作者
转发
0 个新帖子