RabbitMQ 代理上的非活动连接到期
我的 RabbitMQ 代理遇到了连接限制。
此线程中讨论了提高允许连接数的方法: http://lists.rabbitmq.com/pipermail/rabbitmq-讨论/2011-May/013033.html
2011 年 5 月 30 日星期一下午 06:19:47 +0530,Dhinesh Kumar 写道:
我正在尝试找到我可以建立的最大 amqp 连接数 在 Ubuntu 上运行 RabbitMQ 代理。 我尝试了 Java 和 erlang 客户端来创建连接,但我不能 成功超过 829 个连接。
我想知道如何增加数量?
并且给出了解决方案:
2011 年 5 月 30 日星期一上午 8:14,Matthew Sackman 写道:
您可能达到了 ulimit。编辑 /etc/security/limits.conf 并 允许rabbitmq用户有更高的“nofile”设置。兔子 将登录启动它允许的套接字数量,因此一旦 更改已生效并且您已重新启动兔子,您应该会发现 记录条目以证明其正常工作。
马修
虽然我可以提高此限制,但我宁愿关闭未使用的连接。有没有一种方法可以使在一定时间内未使用的连接过期?
I'm running into the connection limit on my RabbitMQ broker
A method for raising the number of allowed connections is discussed in this thread:
http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2011-May/013033.html
On Mon, May 30, 2011 at 06:19:47PM +0530, Dhinesh Kumar wrote:
I am trying to find the maximum number of amqp connections i can establish
with a RabbitMQ broker running on Ubuntu.
I tried both Java and erlang client to create connections but i could not
succeed more than 829 connections.I like to know how can i increase the number ??
And a solution is offered:
On Mon, May 30, 2011 at 8:14AM, Matthew Sackman wrote:
You're likely hitting the ulimit. Edit /etc/security/limits.conf and
allow the rabbitmq user to have a much higher "nofile" setting. Rabbit
will log on start up how many sockets it's permitting, so once the
change has taken effect and you've restarted rabbit, you should find
log entries to demonstrate it's working.Matthew
While I can raise this limit, I'd rather close unused connections. Is there a method for expiring connections which have not been used in a certain amount of time?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我通过打开心跳解决了这个问题:
https://github.com/pika /pika/blob/master/pika/heartbeat.py
这样,如果连接中断,服务器会处理将其关闭。
I fixed this by turning on heartbeats:
https://github.com/pika/pika/blob/master/pika/heartbeat.py
That way, if a connection is interrupted, the server handles shutting it down.