V
V
vosyukov2018-01-14 14:00:13
Python
vosyukov, 2018-01-14 14:00:13

Why is there a disconnect with rabbitmq during a long task?

credentials = pika.PlainCredentials(rabbitmqConf['user'], rabbitmqConf['password'])
parameters = pika.ConnectionParameters(rabbitmqConf['host'], rabbitmqConf['port'], '/', credentials, socket_timeout=20)
connection = pika.BlockingConnection(parameters)
channel = connection.channel()
channel.queue_declare(queue=rabbitmqConf['queueName'], durable=True)
channel.basic_qos(prefetch_count=1)
channel.basic_consume(callback, queue=rabbitmqConf['queueName'])
channel.start_consuming()

When executing a long command (~10 min) and when calling
ch.basic_ack(delivery_tag=method.delivery_tag)
pymongo, it gives the following error
(-1, "ConnectionResetError(10054, 'Удаленный хост принудительно разорвал существующее подключение', None, 10054, None)")

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question