简体   繁体   English

ActiveMQ-慢速kaha数据库访问导致ActiveMQ响应速度不够快

[英]ActiveMQ - Slow kaha DB access causing ActiveMQ to not respond fast enough

I have a wso2 ESB talking to activeMQ (persistent messaging). 我有一个wso2 ESB与activeMQ(持久消息传递)进行交谈。 Sometimes, the threads on ESB stack up because all the threads are waiting for activeMQ to respond to the various calls being made to it. 有时,ESB上的线程会堆积,因为所有线程都在等待activeMQ响应对它的各种调用。 Eventually the calls error out. 最终,通话出错。

Meanwhile in the ActiveMQ logs, I see a lot of "Slow Kaha DB access" logs. 同时,在ActiveMQ日志中,我看到了很多“ Slow Kaha DB access”日志。 Some examples: 一些例子:

  1. Slow KahaDB access: cleanup took 5138 慢速KahaDB访问:清理花费5138
  2. Slow KahaDB access: Journal append took: 1635 ms, Index update took 2330 ms 慢速KahaDB访问:日志附加花费:1635毫秒,索引更新花费了2330毫秒

This is a big issue in our system because as soon as AMQ stops responding quick enough, we lock up threads. 这是我们系统中的一个大问题,因为一旦AMQ停止足够快的响应,我们就会锁定线程。 It seems like becasue IO/access is taking so long, activeMQ stops responding to our ESBs. 似乎是因为IO /访问时间太长,activeMQ停止响应我们的ESB。 Since we continue to try to queue messages on ActiveMQ (intended functionality), we open more and more connections, using more and more threads till the threads are maxed out. 由于我们继续尝试在ActiveMQ(预期功能)上将消息排队,因此,我们将使用越来越多的线程来打开越来越多的连接,直到线程用完为止。

After a few minutes threads our released and activeMQ becomes responsive again, but by then its too late for our system because the ESBs spin out of control due to backed up traffic and activeMQ freezing up. 几分钟后,我们发布的和activeMQ再次响应,但是对于我们的系统而言已经太迟了,因为由于备份的流量和activeMQ冻结,ESB失控了。

Anyone face the same problem? 有人遇到同样的问题吗? Any info anyone can provide on how to trouble shoot this is appreciated. 任何人都可以提供有关如何排除故障的信息,我们对此表示赞赏。

Thanks 谢谢

Unless you absolutely require persistence, you can try sending non-persistent messages and change the broker to be non-persistent. 除非您绝对需要持久性,否则您可以尝试发送非持久性消息并将代理更改为非持久性。 See the ActiveMQ documentation on the precise steps to do that. 请参阅ActiveMQ 文档 ,以了解执行此操作的确切步骤。 In that case, the broker will not write any messages out to disk, but keep them only in memory. 在这种情况下,代理不会将任何消息写出到磁盘,而仅将其保留在内存中。 If the broker crashes however, that means that those messages are lost. 但是,如果代理崩溃,则意味着这些消息将丢失。

Otherwise, I'd recommend that you either address the IO performance directly by replacing the hardware, or by switching to a clustered ActiveMQ deployment to spread the load more evenly. 否则,建议您通过更换硬件直接解决IO性能,或者切换到群集ActiveMQ部署以更均匀地分散负载。

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

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