Python 消费者:无法连接到amqp://dfmngfek:**@salamander.rmq.cloudamqp.com:5672/dfmngfek:[Errno 104]对等方重置连接

Python 消费者:无法连接到amqp://dfmngfek:**@salamander.rmq.cloudamqp.com:5672/dfmngfek:[Errno 104]对等方重置连接,python,django,rabbitmq,celery,cloudamqp,Python,Django,Rabbitmq,Celery,Cloudamqp,我的网站使用Python 3.5.6、Django 1.11.20、Cellery 4.3.0、CloudAMQP和基于RabbitMQ的Heroku运行。Cellery在将应用程序部署到Heroku时返回以下错误: 消费者:无法连接到amqp://dfmngfek:*@salamander.rmq.cloudamqp.com:5672/dfmngfek:[Errno 104]对等方重置连接 我找不到这个问题的来源 以下是我的设置: CELERY_BROKER_POOL_LIMIT = 1 CE

我的网站使用Python 3.5.6、Django 1.11.20、Cellery 4.3.0、CloudAMQP和基于RabbitMQ的Heroku运行。Cellery在将应用程序部署到Heroku时返回以下错误:

消费者:无法连接到amqp://dfmngfek:*@salamander.rmq.cloudamqp.com:5672/dfmngfek:[Errno 104]对等方重置连接

我找不到这个问题的来源

以下是我的设置:

CELERY_BROKER_POOL_LIMIT = 1
CELERY_BROKER_CONNECTION_MAX_RETRIES = 100
设置\u remote.py:

CELERY_BROKER_URL = os.environ['CLOUDAMQP_URL']
__init.py\uuu:

from .celery_tasks import app as celery_app
__all__ = ['celery_app']
芹菜_tasks.py:

import os
from celery import Celery
from celery.schedules import crontab
from datetime import datetime, timedelta
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'terradiem.settings')
from django.conf import settings
app = Celery('terradiem')
app.config_from_object('django.conf:settings', namespace='CELERY')
app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)

app.conf.CELERYBEAT_SCHEDULE = \
    {
        'updateavcontribrating_task':
            {
                'task': 'gautocomplete.tasks.updateavplacecontribratingregular',
                'schedule': crontab(0, 0, day_of_month='2'),

            },
     }
gautocomplete/tasks.py:

@app.task(bind=True)
def updateavplacecontribratingregular(self):
    Etc...
错误消息:

Sep 29 16:15:25 terradiem app/beat.1:  -------------- celery@6e5f2660-eba2-4db3-9aba-5ac2b9547b70 v4.3.0 (rhubarb) 
Sep 29 16:15:25 terradiem app/beat.1: ---- **** -----  
Sep 29 16:15:25 terradiem app/beat.1: --- * ***  * -- Linux-4.4.0-1054-aws-x86_64-with-debian-buster-sid 2019-09-29 16:15:24 
Sep 29 16:15:25 terradiem app/beat.1: -- * - **** ---  
Sep 29 16:15:25 terradiem app/beat.1: - ** ---------- [config] 
Sep 29 16:15:25 terradiem app/beat.1: - ** ---------- .> app:         terradiem:0x7f56212a8550 
Sep 29 16:15:25 terradiem app/beat.1: - ** ---------- .> transport:   amqp://dfmngfek:**@salamander.rmq.cloudamqp.com:5672/dfmngfek 
Sep 29 16:15:25 terradiem app/beat.1: - ** ---------- .> results:     disabled:// 
Sep 29 16:15:25 terradiem app/beat.1: - *** --- * --- .> concurrency: 8 (prefork) 
Sep 29 16:15:25 terradiem app/beat.1: -- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker) 
Sep 29 16:15:25 terradiem app/beat.1: --- ***** -----  
Sep 29 16:15:25 terradiem app/beat.1:  -------------- [queues] 
Sep 29 16:15:25 terradiem app/beat.1:                 .> celery           exchange=celery(direct) key=celery 
Sep 29 16:15:25 terradiem app/beat.1:                  
Sep 29 16:15:25 terradiem app/beat.1:  
Sep 29 16:15:25 terradiem app/beat.1: [tasks] 
Sep 29 16:15:25 terradiem app/beat.1:   . gautocomplete.tasks.updateavplacecontribratingregular 
Sep 29 16:15:25 terradiem app/beat.1:  
Sep 29 16:15:26 terradiem app/web.1: DEBUG 2019-09-29 16:15:25,821 base 12 139757909414400 Configuring Raven for host: https://sentry.io 
Sep 29 16:15:26 terradiem app/beat.1: [2019-09-29 16:15:26,075: INFO/Beat] beat: Starting... 
Sep 29 16:15:29 terradiem app/beat.1: [2019-09-29 16:15:29,041: ERROR/MainProcess] consumer: Cannot connect to amqp://dfmngfek:**@salamander.rmq.cloudamqp.com:5672/dfmngfek: [Errno 104] Connection reset by peer. 
Sep 29 16:15:29 terradiem app/beat.1: Trying again in 2.00 seconds... 

任何帮助都是非常有用的

超出了CloudAMPQ的使用限制。我选择了更大的计划,错误不再出现。

检查,谢谢!的确我在下面报告这个答案。