RabbitMQ supports long connection times

I am using the hosting provider RabbitMQ ie CloudAMQP and running the django application server on heroku. Everything works fine in the local environment, but on Heroku, where CloudAMQP limits the number of concurrent connections to the broker, the connections seem to be saved forever, resulting in the application ending open open connections. This happens even when tasks related to earlier connections are performed by the subscriber (i.e., Hero Worker).

If you were able to successfully use CloudAMQP with Heroku and django celery, can you post what worked for you?

+4
source share
2 answers

I managed to fix this by adding BROKER_POOL_LIMIT=0 to my production settings.

+1
source

BROKER_POOL_LIMIT=0 means that any part of your installation that needs a connection will install it, execute it, and disconnect

while this helps with inactivity settings, you will find that you sporadically hit this limit of 6 connections during periods of higher traffic, because you just need more than 6 connections for all your stuff to talk to cloudamqp

Check the hero’s celery that exceeds the connection limit to explain why and how to fix it.

0
source

Source: https://habr.com/ru/post/1486256/


All Articles