Wow, cool. I shall run a pip upgrade later. :) 

Cheers!

Ciaran


On Friday, 25 April 2014 10:34:16 UTC+1, Stephen McDonald wrote:
>
> In fact I've already committed it, so no need.
>
> Thanks again.
>
>
> On Fri, Apr 25, 2014 at 6:24 PM, Stephen McDonald <[email protected]<javascript:>
> > wrote:
>
>> Seems like a reasonable fix - if you'd like to submit a pull request I'll 
>> merge it.
>>
>> Thanks
>>
>>
>> On Wed, Apr 23, 2014 at 7:23 PM, Ciaran Bradley 
>> <[email protected]<javascript:>
>> > wrote:
>>
>>> Hi,
>>>
>>> I'm not entirely sure whether this is technically a Mezzanine issue or a 
>>> Django issue. I noticed recently after a deploy (Python 2.7, Mezzanine 
>>> 3.0.9, Django 1.6, Postgres 9.3 on a Debian 7 box) that I was generating 
>>> big Postgres log files, filled with this event:
>>>
>>> https://gist.github.com/ciaranbradley/11207009
>>>
>>> I tracked it down to the poll_twitter command running in cron. The 
>>> command was working as expected, but it would generate a new entry each 
>>> time it ran. After finding this similar issue:
>>>
>>>
>>> http://stackoverflow.com/questions/16841505/django-resetting-postgres-connection
>>>
>>> I applied the technique to the poll_twitter command last night and the 
>>> problem seems to be gone. My poll_twitter now looks like this:
>>>
>>> https://gist.github.com/ciaranbradley/11207319
>>>
>>> The command still seems to be up and running as normal and my log file 
>>> loves me again.
>>>
>>> I don't see a specific instruction on Django docs to ensure you close 
>>> the database connection when you create a command, so it might be fair to 
>>> assume that the engine should close the connection gracefully after a 
>>> command is run. Also I note that my deploy is low traffic (just a sandbox 
>>> at the minute) so I suspect that higher traffic sites might be immune if 
>>> the command uses an already open persistent connection. But that's just 
>>> pure speculation on my part.
>>>
>>> Is anyone else experiencing similar?
>>>
>>> Thanks
>>>
>>> Ciaran
>>>   
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Mezzanine Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected] <javascript:>.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> -- 
>> Stephen McDonald
>> http://jupo.org 
>>
>
>
>
> -- 
> Stephen McDonald
> http://jupo.org 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to