django-rq
django-rq copied to clipboard
persistent database connections?
Is there a way to tell django-rq to re-use database connections? It appears from my logs that a new Postgres connection is being opened for every job that is executed. (And it's killing my performance.)
Not at the moment, Django-RQ explicitly closes all DB connections prior to calling os.fork()
and executing jobs.
Suggestions on how we can make this more efficient is welcome.
You should probably use something like pgbouncer to pool postgres connections instead of building this into django-rq. Configuration is pretty simple. In fact, you should be using a connection pooler for Django app too.