django_dramatiq icon indicating copy to clipboard operation
django_dramatiq copied to clipboard

Doesn't close DB connections leading to "FATAL: sorry, too many clients already"

Open Volpym opened this issue 4 years ago • 6 comments

Hi!

I have 5 tasks that run periodically (using periodiq) and each time they these are executed they open a new connection to the database.

Already tried the middleware ordering showcased on issue #76.

Thank you in advance

Volpym avatar Nov 12 '20 10:11 Volpym

@Volpym did you end up figuring out what was causing this? I'm running into the same thing.

agamrp avatar Feb 04 '21 00:02 agamrp

@agamrp unfortunately no.

Volpym avatar Feb 04 '21 06:02 Volpym

@agamrp unfortunately no.

@Volpym Thanks for getting back to me, if you don't mind me asking, did you end up using something else besides dramatiq for your use case?

agamrp avatar Feb 04 '21 08:02 agamrp

@agamrp unfortunately no.

@Volpym Thanks for getting back to me, if you don't mind me asking, did you end up using something else besides dramatiq for your use case?

@agamrp Due to lack of time, I had to use another module (not sure if I'm allowed to share its name but with a google search you will find it).

Volpym avatar Feb 04 '21 08:02 Volpym

In case someone still have this problem.

Try to use the latest version. These two lines should fix it. https://github.com/Bogdanp/django_dramatiq/blob/v0.10.0/django_dramatiq/middleware.py#L68-L69

helsonxiao avatar May 02 '22 04:05 helsonxiao

also mentioned: https://github.com/Bogdanp/django_dramatiq/issues/76 ?

Schulzjo avatar Sep 05 '22 10:09 Schulzjo