-
-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cluster dies when started with Postgres #79
Comments
I use almost the same setup for tests but with Postgresql 9.3.5. To be sure I just ran some tests on that and it was working fine with or without a configured cache. So we'll need to dig deeper to replicate this. Can you test if the same thing is happening when you downgrade to version 0.7.4? Also if I could have a look at your Q_CLUSTER, DATABASES and CACHES settings, I might be able to reproduce it. Just x-out any sensitive information. |
Downgraded to 0.7.4,
Things I've checked:
|
Ok. So we can write off the changes in 0.7.5. |
Of course always when I actually type 'it is not specific to Django Q' it turns out it is. |
The sentinel saves a statistic to the cache provider just before forking the workers. If this cache provider is a database backend, the connection stays open and gets forked and it crashes. Solution is to close any db connection before forking.
Let me know if the dev branch works for you. This seems to solve it for me. The sentinel saves some statistics to the cache just before it spawns the workers et all. When the cache uses the database backend, this db connection is still open and gets forked with the other processes. Not a problem for other cache backends, but Postgres will invalidate the connection. The simple solution is to close any db connections before forking. The reason I never saw this happen on my perfomance test rig, is that I use pgbouncer to pool the connections for the flood tests. |
Yes, the dev branch works properly. Thanks for taking a look at the problem. |
No problem. Thanks for making the effort to report the problem. |
#79 close django db connection before fork
The sentinel saves a statistic to the cache provider just before forking the workers. If this cache provider is a database backend, the connection stays open and gets forked and it crashes. Solution is to close any db connection before forking.
@Koed00 I'm getting the same with the new version: 1.1.0 (with 1.0.2 it was working fine)
|
Using Python 2.7.9, Django 1.8.4, Postgres 9.4.4, django-q 0.7.5 with the 'orm' broker.
Disabling SSL in the database options gets
Django_q is part of INSTALLED_APPS, the DB migrated without a problem, I don't see any output from the devserver - I'm not sure where to go from here.
The text was updated successfully, but these errors were encountered: