RabbitMQ on EC2 Consuming Tons of CPU

后端 未结 2 976
天命终不由人
天命终不由人 2021-01-02 07:07

I am trying to get RabbitMQ with Celery and Django going on an EC2 instance to do some pretty basic background processing. I\'m running rabbitmq-server 2.5.0 on a large EC2

2条回答
  •  旧时难觅i
    2021-01-02 07:42

    Ok, I figured it out.

    Here's the relevant piece of documentation: http://readthedocs.org/docs/celery/latest/userguide/tasks.html#amqp-result-backend

    Old results will not be cleaned automatically, so you must make sure to consume the results or else the number of queues will eventually go out of control. If you’re running RabbitMQ 2.1.1 or higher you can take advantage of the x-expires argument to queues, which will expire queues after a certain time limit after they are unused. The queue expiry can be set (in seconds) by the CELERY_AMQP_TASK_RESULT_EXPIRES setting (not enabled by default).

提交回复
热议问题