<small id='MZeVH'></small><noframes id='MZeVH'>

    <tfoot id='MZeVH'></tfoot>
    • <bdo id='MZeVH'></bdo><ul id='MZeVH'></ul>
      <legend id='MZeVH'><style id='MZeVH'><dir id='MZeVH'><q id='MZeVH'></q></dir></style></legend>

      <i id='MZeVH'><tr id='MZeVH'><dt id='MZeVH'><q id='MZeVH'><span id='MZeVH'><b id='MZeVH'><form id='MZeVH'><ins id='MZeVH'></ins><ul id='MZeVH'></ul><sub id='MZeVH'></sub></form><legend id='MZeVH'></legend><bdo id='MZeVH'><pre id='MZeVH'><center id='MZeVH'></center></pre></bdo></b><th id='MZeVH'></th></span></q></dt></tr></i><div id='MZeVH'><tfoot id='MZeVH'></tfoot><dl id='MZeVH'><fieldset id='MZeVH'></fieldset></dl></div>

        RabbitMQ 错误超时

        RabbitMQ error timeout(RabbitMQ 错误超时)

          <tbody id='e4xed'></tbody>

          <bdo id='e4xed'></bdo><ul id='e4xed'></ul>

              <i id='e4xed'><tr id='e4xed'><dt id='e4xed'><q id='e4xed'><span id='e4xed'><b id='e4xed'><form id='e4xed'><ins id='e4xed'></ins><ul id='e4xed'></ul><sub id='e4xed'></sub></form><legend id='e4xed'></legend><bdo id='e4xed'><pre id='e4xed'><center id='e4xed'></center></pre></bdo></b><th id='e4xed'></th></span></q></dt></tr></i><div id='e4xed'><tfoot id='e4xed'></tfoot><dl id='e4xed'><fieldset id='e4xed'></fieldset></dl></div>

                  <legend id='e4xed'><style id='e4xed'><dir id='e4xed'><q id='e4xed'></q></dir></style></legend>

                  <tfoot id='e4xed'></tfoot>
                1. <small id='e4xed'></small><noframes id='e4xed'>

                  本文介绍了RabbitMQ 错误超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我设置了 RabbitMQ 以解析来自外部 API 的大约 20.000 个请求,但几分钟后它一直超时.它确实可以正确解析总共 20.000 个请求中的大约 2000 个.

                  I've set up RabbitMQ in order to parse some 20.000 requests from an external API but it keeps timing out after a few minutes. It does get to correctly parse about 2000 out of the total 20.000 requests.

                  日志文件说:

                  =INFO REPORT==== 16-Feb-2016::17:02:50 ===
                  accepting AMQP connection <0.1648.0> (127.0.0.1:33091 -> 127.0.0.1:5672)
                  
                  =ERROR REPORT==== 16-Feb-2016::17:03:21 ===
                  closing AMQP connection <0.1648.0> (127.0.0.1:33091 -> 127.0.0.1:5672):
                  {writer,send_failed,{error,timeout}}
                  

                  我已经增加了心跳值,但我无法弄清楚它为什么会超时.配置为:Ubuntu 14.04、NGINX 1.8.1、RabbitMQ 3.6.0

                  I've already increased the heartbeat value but I cannot figure out why it's timing out. Configuration is: Ubuntu 14.04, NGINX 1.8.1, RabbitMQ 3.6.0

                  感谢您的宝贵时间和意见!

                  I'd appreciate your time and input !

                  推荐答案

                  我刚刚用python解决了一个类似的问题.在我的例子中,它是通过减少消费者的预取计数来解决的,这样它的接收缓冲区中排队的消息就会更少.

                  I've just solved a similar problem in python. In my case, it was solved by reducing the prefetch count on the consumer, so that it had fewer messages queued up in its receive buffer.

                  我的理论是消费者的接收缓冲区已满,然后 RMQ 尝试将一些其他消息写入消费者的套接字,但由于消费者的套接字已满而不能.RMQ 在此套接字上阻塞,最终超时并关闭消费者上的连接.具有较小的预取队列意味着套接字接收缓冲区不会被填满,并且 RMQ 能够写入它试图执行的任何簿记消息,因此不会在其写入时超时,也不会关闭连接.

                  My theory is that the receive buffer on the consumer gets full, and then RMQ tries to write some other message to the consumer's socket and can't due to the consumer's socket being full. RMQ blocks on this socket, and eventually timeouts and just closes the connection on the consumer. Having a smaller prefetch queue means the socket receive buffer doesn't get filled, and RMQ is able to write whatever bookkeeping messages it was trying to do and so doesn't timeout on its writes nor close the connection.

                  虽然这只是一个理论,但它似乎在我的测试中成立.

                  This is just a theory though, but it seems to hold in my testing.

                  在 Python 中,可以这样设置预取计数:

                  In Python, setting the prefetch count can be done like so:

                  subChannel.basicQos(10);
                  

                  (感谢@shawn-guo 提醒我添加此代码段)

                  (Thanks to @shawn-guo for reminding me to add this code snippet)

                  这篇关于RabbitMQ 错误超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                  1. <i id='rblyB'><tr id='rblyB'><dt id='rblyB'><q id='rblyB'><span id='rblyB'><b id='rblyB'><form id='rblyB'><ins id='rblyB'></ins><ul id='rblyB'></ul><sub id='rblyB'></sub></form><legend id='rblyB'></legend><bdo id='rblyB'><pre id='rblyB'><center id='rblyB'></center></pre></bdo></b><th id='rblyB'></th></span></q></dt></tr></i><div id='rblyB'><tfoot id='rblyB'></tfoot><dl id='rblyB'><fieldset id='rblyB'></fieldset></dl></div>
                      • <bdo id='rblyB'></bdo><ul id='rblyB'></ul>
                          <legend id='rblyB'><style id='rblyB'><dir id='rblyB'><q id='rblyB'></q></dir></style></legend>

                              <tbody id='rblyB'></tbody>

                            <tfoot id='rblyB'></tfoot>

                            <small id='rblyB'></small><noframes id='rblyB'>