activemq 连接爆增导致oom的问题

冉鹏 发布于 2012/07/02 20:52
阅读 3K+
收藏 0

   最近使用activemq作为消息服务,按照企业级应用的标准部署的activemq(HA模式),但是发现了一个oom的故障,客户端尝试连接服务器:

客户端打印日志如下:org.apache.activemq.transport.failover.FailoverTransport] Successfully connected to tcp://*.*.*.*:61616 ,显示连接成功。

客户端随后报如下异常:

Caused by: javax.jms.JMSException: org.apache.activemq.transport.RequestTimedOutIOException

        at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:62)

        at org.apache.activemq.ActiveMQConnection.doSyncSendPacket(ActiveMQConnection.java:1342)

        at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1322)

        at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1758)

        at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:231)

        at org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:269)

        at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:533)

        at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:513)

        at org.springframework.jms.core.JmsTemplate$2.doInJms(JmsTemplate.java:479)

        at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:430)

        at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:477)

        at org.springframework.jms.core.JmsTemplate.convertAndSend(JmsTemplate.java:557)

        at com.taobao.dw.monitor.jobmanager.MonitorJobManager.send(MonitorJobManager.java:703)

        at com.taobao.dw.monitor.job.TriggerJob.execute(TriggerJob.java:76)

        at org.quartz.core.JobRunShell.run(JobRunShell.java:206)

        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:548)

Caused by: org.apache.activemq.transport.RequestTimedOutIOException

        at org.apache.activemq.transport.FutureResponse.getResult(FutureResponse.java:54)

        at org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorrelator.java:92)

        at org.apache.activemq.ActiveMQConnection.doSyncSendPacket(ActiveMQConnection.java:1329)

        ... 14 more

两个小时后,服务端报如下error:

Failed to remove tmp destination temp-queue://ID:hostname-44769-1338308025382-0:2:1 | org.apache.activemq.br

oker.TransportConnection.Service | StopAsync:/*.*.*.*:47268-4058544

java.lang.OutOfMemoryError: unable to create new native thread

        at java.lang.Thread.start0(Native Method)

        at java.lang.Thread.start(Thread.java:597)

        at org.apache.activemq.broker.TransportConnection.serviceExceptionAsync(TransportConnection.java:247)

        at org.apache.activemq.broker.TransportConnection.dispatchSync(TransportConnection.java:777)

        at org.apache.activemq.broker.region.TopicSubscription.dispatch(TopicSubscription.java:525)

        at org.apache.activemq.broker.region.TopicSubscription.add(TopicSubscription.java:99)

        at org.apache.activemq.broker.region.policy.SimpleDispatchPolicy.dispatch(SimpleDispatchPolicy.java:48)

        at org.apache.activemq.broker.region.Topic.dispatch(Topic.java:634)

        at org.apache.activemq.broker.region.Topic.doMessageSend(Topic.java:468)

        at org.apache.activemq.broker.region.Topic.send(Topic.java:404)

        at org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:365)

        at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:523)

        at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:515)

        at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:446)

        at org.apache.activemq.advisory.AdvisoryBroker.fireAdvisory(AdvisoryBroker.java:441)

        at org.apache.activemq.advisory.AdvisoryBroker.removeDestination(AdvisoryBroker.java:179)

        at org.apache.activemq.broker.BrokerFilter.removeDestination(BrokerFilter.java:149)

        at org.apache.activemq.broker.BrokerFilter.removeDestination(BrokerFilter.java:149)

        at org.apache.activemq.broker.MutableBrokerFilter.removeDestination(MutableBrokerFilter.java:155)

        at org.apache.activemq.broker.TransportConnection.processRemoveConnection(TransportConnection.java:735)

        at org.apache.activemq.broker.TransportConnection.doStop(TransportConnection.java:1025)

        at org.apache.activemq.broker.jmx.ManagedTransportConnection.doStop(ManagedTransportConnection.java:71)

        at org.apache.activemq.broker.TransportConnection$3.run(TransportConnection.java:952)

        at java.lang.Thread.run(Thread.java:619)

加载中
返回顶部
顶部