Wednesday, March 30, 2016

Re: hanging django/postgres idle connections

I'm also seeing this in two of our apps. Has anybody figured out a solution? Running Django 1.7.11.

On Monday, November 23, 2015 at 4:36:23 PM UTC-5, Jon Sandness wrote:
I'm seeing this same issue in OS X 10.11.1 - interestingly, the hang only occurs when I run migrations through Jenkins.  If I manually run the command inside of a VirtualBox session, it works as expected.

Jon

On Friday, August 1, 2014 at 6:41:53 AM UTC-7, Jani Kajala wrote:
Haven't tried (yet), I'm new to Python & Django & Postgres, got on board with Python 3.4.1 and Django 1.7c1. I'm starting to suspect this isn't really Django related directly, since I can consistently reproduce the problem following way: 1) Run e.g. test case, break it in debugger 2) Stop debug session. Django cannot really do anything about me interrupting the debugging session, but it should not block access to DB indefinitely. However, it does. I tried also to install pgbouncer, but it made interestingly situation worse, now even a single connection can block access to DB even if I have pgbouncer max_connections set to 100. So maybe this is something Windows/VirtualBox networking related.

On Thursday, July 31, 2014 10:58:41 PM UTC+7, Collin Anderson wrote:
Does it work fine on django 1.6? It could be a regression.

On Wednesday, July 30, 2014 10:41:58 AM UTC-4, Jani Kajala wrote:
Hi,

I have a problem with leaking Postgres DB connections even if I have CONN_MAX_AGE=0. Every time I start the server and stop it by Ctrl+Break a DB connection is leaked.

When I check from Postgres there is bunch of "idle" connections with following content:
SELECT "django_migrations"."app", "django_migrations"."name" FROM "django_migrations"

I'm running Python on Windows 8 + virtualenv with following installs:
Django==1.7c1
future==0.12.4
psycopg2==2.5.3
python3-memcached==1.51
pytz==2014.4
six==1.7.3
sqlparse==0.1.11
virtualenv==1.11.6
xlwt-future==0.8.0

Postgres is running in Ubuntu 14.04 in latest Oracle VirtualBox on same Windows machine.

Any ideas?


Thanks,
Jani


HZ                    branding. advertising. digital. integrated. 
DC METRO     10101 molecular drive, suite 300, rockville, maryland 20850 | 301-294-6302
NEW YORK     298 fifth avenue, 2nd floor, new york, new york 10001 |  646-454-9206
BALTIMORE   1429 aliceanna street, 3rd floor, baltimore, maryland 21231 | 443-990-1834
BAY AREA       725 front street, suite 206, santa cruz, california 95060 | 831-421-9017
hzdg.com facebook.com/hzdg  | follow us @hzdg

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d27e1bc2-2ff8-4ff4-9407-d71362cc909c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment