简体   繁体   English

当超过1000位收件人时,Rabbitmq无法发送新闻稿

[英]Rabbitmq can't send newletters when over 1000 recipients

I have a Rabbitmq server and I wish to send out newletters. 我有一个Rabbitmq服务器,我希望发送新邮件。 The problem is I'm uploading the recipients with a .csv file and if it has more than 1000 lines, the error occurs. 问题是我正在向收件人上传一个.csv文件,如果该文件有1000行以上,则会发生错误。

Somehow I suspect the following line to be fault: 我以某种方式怀疑以下行是错误的:

MQ.fanout(exchange).publish(Marshal.dump(data))

The messages are not being transported for the queues or I don't know. 消息未传输到队列中,或者我不知道。

What I can do is: I have to delete the actual "stuck" project because I can't send any onther newsletter feed until it is deleted. 我能做的是:我必须删除实际的“卡住”项目,因为在删除它之前,我无法发送任何其他时事通讯提要。 After I delete it, the rest of the newsletters will be sent out perfectly. 删除后,其余新闻通讯将被完美发送出去。

Edit: 编辑:

the logs did not show any errors. 日志未显示任何错误。 However, after setting the log to a lower standing, I've got this: 但是,将日志设置为较低的值后,我得到了以下信息:

/var/log/rabbitmq/error.log /var/log/rabbitmq/error.log

2015-10-28 10:34:33.353 [error] <0.1182.0> Error on AMQP connection <0.1182.0> (127.0.0.1:45994 -> 127.0.0.1:5672, vhost: '/bposted', user: 'bposted', state: running), channel 0:
{amqp_error,connection_forced,"broker forced connection closure with reason 'shutdown'",none}

2015-10-28 10:52:11.336 [error] <0.364.0> Error on AMQP connection <0.364.0> (127.0.0.1:46042 -> 127.0.0.1:5672, vhost: '/bposted', user: 'bposted', state: running), channel 1:
{amqp_error,frame_error,"type 3, all octets = <<>>: {frame_too_large,4319180,131064}",none}

2015-10-28 10:52:14.342 [error] <0.364.0> closing AMQP connection <0.364.0> (127.0.0.1:46042 -> 127.0.0.1:5672):
fatal_frame_error

This might be a clue? 这可能是一个线索吗?

{frame_too_large,4319180,131064}

Try to increase frame_max parameter as described here https://www.rabbitmq.com/configure.html 尝试按此处所述增加frame_max参数https://www.rabbitmq.com/configure.html

[
  {rabbit, [
     {frame_max, 4319180},
    ]
  } 
].

Ultimately we have found the sollution. 最终,我们找到了解决方案。 It was basically what CHAPa said, the rabbitmq was able to recieve bigger frames than the standard (we've set the frame_max for 0). 基本上就是CHAPA所说的,rabbitmq能够接收比标准更大的帧(我们将frame_max设置为0)。 But couldn't find the AMQP file that passes the info. 但是找不到传递信息的AMQP文件。 This is where we have found it: 这是我们找到它的地方:

/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/amqp-0.7.0/lib/amqp/client.rb

And had to change the frame_max value to 0 manually. 并且必须手动将frame_max值更改为0。 From this point, it works like a charm. 从这一点来看,它就像一个魅力。 :) Thank you for the advices. :)谢谢您的建议。

BTW: If I'm gonna be in charge when we scrap this server, I won't upgrade it, or install another Rabbitmq server. 顺便说一句:如果我负责报废此服务器,则不会升级它,也不会安装其他Rabbitmq服务器。 PHPlist is my style :) Vote please this up, so it can be on top when somebody searches it. PHPlist是我的风格:)请对此进行投票,以便当有人搜索它时可以放在顶部。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM