使用Spring JMS DefaultMessageListenerContainer cacheLevelName缓存连接失败\u无

使用Spring JMS DefaultMessageListenerContainer cacheLevelName缓存连接失败\u无,spring,jms,spring-jms,Spring,Jms,Spring Jms,我将Spring JMS DefaultMessageListenerContainer实现更改为使用CACHE\u NONE的cacheLevelName,并遇到以下异常。概述了这些变化。我使用的是GlassFishv2.1、OpenMQ4.4和Spring3。*。你知道我哪里会出错吗 Web应用程序日志: [16/May/2012:21:10:14 UTC] [B1039]: Broker "appbroker@host:45028" ready. [16/May/2012:21:10:41

我将Spring JMS DefaultMessageListenerContainer实现更改为使用CACHE\u NONE的cacheLevelName,并遇到以下异常。概述了这些变化。我使用的是GlassFishv2.1、OpenMQ4.4和Spring3。*。你知道我哪里会出错吗

Web应用程序日志:

[16/May/2012:21:10:14 UTC] [B1039]: Broker "appbroker@host:45028" ready.
[16/May/2012:21:10:41 UTC] [B1065]: Accepting: guest@206.220.220.111:56811->jms:55601. Count: service=1 broker=1
[16/May/2012:21:10:48 UTC] [B1065]: Accepting: guest@206.220.220.111:25432->jms:55601. Count: service=2 broker=2
[16/May/2012:21:10:55 UTC] [B1065]: Accepting: guest@206.220.220.111:25478->jms:55601. Count: service=3 broker=3
[16/May/2012:21:11:56 UTC] [B1065]: Accepting: guest@206.220.220.73:44040->jms:55601. Count: service=4 broker=4
[16/May/2012:21:11:56 UTC] [B1065]: Accepting: guest@206.220.219.227:33237->jms:55601. Count: service=5 broker=5
...
...
[16/May/2012:21:17:50 UTC] [B1065]: Accepting: admin@127.0.0.1:46564->jms:55601. Count: service=500 broker=500

[16/May/2012:21:17:50 UTC] WARNING [B3004]: **No threads are available to process a new connection on service jms. 1000 threads out of a maximum of 1000 threads are already in use by other connections.** A minimum of 2 threads must be available to process the connection. Please either limit the # of connections or increase the imq.<service>.max_threads property. Closing the new connection.
[16/May/2012:21:18:01 UTC] [B1066]:   Closing: ???@127.0.0.1:0->jms:0 because "[B3004]: No threads are available to process a new connection on service jms. 1000 threads out of a maximum of 1000 threads are already in use by other connections. A minimum of 2 threads must be available to process the connection. Please either limit the # of connections or increase the imq.<service>.max_threads property. Closing the new connection. ". Count: service=0 broker=500
[16/May/2012:21:18:01 UTC] WARNING Problem detected while attempting to send notification mq.connection.close from MBean Service Monitor
[16/May/2012:21:18:01 UTC] WARNING Cannot determine service name from connection ID: 7881641671884329217
[#| 2012-05-16T21:18:12.620+0000严重sun-appserver9.1 | javax.resourceadapter.mqjmsra.outbound.connection | | | | ThreadID=284;| ThreadName=UpdateJMContainer-90;(U RequestID=3aa71c9e-3ac0-4142-b914-ffbdc6e6bb37;| mqjmsra | MC4001:构造函数:中止:JMSException on createConnection=[C4000]:数据包确认失败。用户=45088本地主机:代理(55601)|#]

2012-05-16 21:18:17636[更新内容-90]WARN org.springframework.jms.listener.DefaultMessageListenerContainer-目标“TestQ”的jms消息侦听器调用程序设置失败-尝试恢复。原因:MQRA:CFA:分配失败:createConnection:分配连接时出错。原因:MQJMSRA_MC4001:构造函数:中止:createConnection上的JMSException=[C4000]:数据包确认失败。用户=管理员,代理=本地主机:45088(55601)

代理日志文件:

[16/May/2012:21:10:14 UTC] [B1039]: Broker "appbroker@host:45028" ready.
[16/May/2012:21:10:41 UTC] [B1065]: Accepting: guest@206.220.220.111:56811->jms:55601. Count: service=1 broker=1
[16/May/2012:21:10:48 UTC] [B1065]: Accepting: guest@206.220.220.111:25432->jms:55601. Count: service=2 broker=2
[16/May/2012:21:10:55 UTC] [B1065]: Accepting: guest@206.220.220.111:25478->jms:55601. Count: service=3 broker=3
[16/May/2012:21:11:56 UTC] [B1065]: Accepting: guest@206.220.220.73:44040->jms:55601. Count: service=4 broker=4
[16/May/2012:21:11:56 UTC] [B1065]: Accepting: guest@206.220.219.227:33237->jms:55601. Count: service=5 broker=5
...
...
[16/May/2012:21:17:50 UTC] [B1065]: Accepting: admin@127.0.0.1:46564->jms:55601. Count: service=500 broker=500

[16/May/2012:21:17:50 UTC] WARNING [B3004]: **No threads are available to process a new connection on service jms. 1000 threads out of a maximum of 1000 threads are already in use by other connections.** A minimum of 2 threads must be available to process the connection. Please either limit the # of connections or increase the imq.<service>.max_threads property. Closing the new connection.
[16/May/2012:21:18:01 UTC] [B1066]:   Closing: ???@127.0.0.1:0->jms:0 because "[B3004]: No threads are available to process a new connection on service jms. 1000 threads out of a maximum of 1000 threads are already in use by other connections. A minimum of 2 threads must be available to process the connection. Please either limit the # of connections or increase the imq.<service>.max_threads property. Closing the new connection. ". Count: service=0 broker=500
[16/May/2012:21:18:01 UTC] WARNING Problem detected while attempting to send notification mq.connection.close from MBean Service Monitor
[16/May/2012:21:18:01 UTC] WARNING Cannot determine service name from connection ID: 7881641671884329217
[16/May/2012:21:10:14 UTC][B1039]:经纪人“appbroker@host:45028“准备就绪。
[2012年5月16日:21:10:41 UTC][B1065]:接受:guest@206.220.220.111:56811->jms:55601.计数:service=1 broker=1
[2012年5月16日:21:10:48 UTC][B1065]:接受:guest@206.220.220.111:25432->jms:55601.计数:service=2 broker=2
[2012年5月16日:21:10:55 UTC][B1065]:接受:guest@206.220.220.111:25478->jms:55601.计数:service=3 broker=3
[2012年5月16日:21:11:56 UTC][B1065]:接受:guest@206.220.220.73:44040->jms:55601.计数:service=4 broker=4
[2012年5月16日:21:11:56 UTC][B1065]:接受:guest@206.220.219.227:33237->jms:55601.计数:service=5 broker=5
...
...
[2012年5月16日:21:17:50 UTC][B1065]:接受:admin@127.0.0.1:46564->jms:55601.计数:service=500代理=500
[2012年5月16日:21:17:50 UTC]警告[B3004]:**没有线程可用于处理服务jms上的新连接。在最多1000个线程中,有1000个线程已被其他连接使用。**必须至少有2个线程可用于处理连接。请限制连接数或增加imq..max\u threads属性。关闭新连接。
[16/May/2012:21:18:01 UTC][B1066]:结束:???@127.0.0.1:0->jms:0,因为“[B3004]:没有线程可用于处理服务jms上的新连接。其他连接已使用最多1000个线程中的1000个线程。必须至少有2个线程可用于处理该连接。请限制连接数或增加imq..max#u threads属性。关闭新连接。“.Count:服务=0代理=500
[16/May/2012:21:18:01 UTC]尝试从MBean服务监视器发送通知mq.connection.close时检测到警告问题
[16/May/2012:21:18:01 UTC]警告无法从连接ID确定服务名称:7881641671884329217

此C4000错误是一个网络通用异常处理程序。这可能是缓存级别更改的结果。根据池设置,应用程序可能会打开太多与服务器的连接,并且服务器可能缺少管理这些连接的资源-最好的猜测可能是内存

请检查OpenMQ服务器日志文件和内存使用情况


消费者和MQ服务器之间是否存在任何可能控制连接建立的网络配置(防火墙、QoS路由器…)?快速打开许多连接可能会被视为一种常见的DoS攻击的SYN洪水。

我在上面添加了我的代理日志文件,它似乎达到了最大线程数(1000)。增加imq..max_threads属性是真正的解决方案还是其他问题?代理启动脚本上的内存设置为“-Xmx3048m-Xincgc”&感谢您的帮助!真正的问题是:您真的需要同时准备这么多连接/使用者吗?我可以降低最大池大小并尝试。出于某种原因,我的测试服务器上的设置仅为124,即[B1065]:接受:admin@206.220.219.238:47378->jms:35425.Count:service=124 broker=124并且没有最大线程问题,而生产转到500,即Count:service=500 broker=500。池设置对于两者都是完全相同的,所以我有点生气…发送到队列的消息在负载方面非常接近。你真的看到了吗gh Resources使500个使用者可以同时处理500条消息(CPU和内存)?您应该使用较少的使用者(例如,如果您有16个内核,则为20个)进行基准测试,以找到最佳并行化选项以获得最佳吞吐量…是的,这可能足够了。