El viernes, 3 de junio de 2016, 4:41:16 (UTC-3), Florian Apolloner escribió:
>
>
> Yes, SIGTERM is a signal Python should handle nicely, SIGKILL will just 
> nuke the process from earth and prevent any cleanup I think. Note that the 
> OS will clean up though (sooner or later). As for the open connections: 
> Check on postgres where from they are and then check on that machine to 
> which process they belong and maybe use gdb to find out more.
>  
>

When I saw the issue the first thing I checked was the source IP and was 
the amazon machine as expected, then I'm almost sure those connections were 
used by the thread pools because the last statement was a 'commit' where 
normally most of the statements listed through the list connections query 
are selects and those pools always end up with an insert so the commit 
makes sense.

The only issue I see here on the postgres side would be that you have very 
> long timeouts configured.
>

Looks like postgres doesn't have any kind of connection timeout and you 
need to use pg bouncer for that.
 

Well, I guess that with the connection.close_if_unusable_or_obsolete() 
change it should improve the connection handling of the thread pools.


-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/5fbbb59e-4ed6-4795-b8e8-c97da791d3d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to