activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jockeyyan <jockey...@gmail.com>
Subject ActiveMQ Broker Scheduler unable to create new native thread
Date Fri, 21 Sep 2012 06:34:53 GMT
Hi:

I am using ActiveMQ 5.4.3 to make some loading test. I created one producer,
one broker and one consumer with Spring JAX-WS config. The producer invoke
the functions to send messages to broker continuously and the consumer just
receive and echo.
Everything is OK at beginning. After invoke many times(about 2000 to 3000),
the broker is crashed and display the following error message, Does anyone
could help me fingure out what the matter of the broker is?

--------------------------------------------------------------------------------------------------
Exception in thread "ActiveMQ Broker[localhost] Scheduler"
java.lang.OutOfMemory
Error: unable to create new native thread
        at java.lang.Thread.start0(Native Method)
        at java.lang.Thread.start(Thread.java:640)
        at
java.util.concurrent.ThreadPoolExecutor.addIfUnderMaximumPoolSize(Thr
eadPoolExecutor.java:727)
        at
java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.ja
va:657)
        at
org.apache.activemq.thread.PooledTaskRunner.wakeup(PooledTaskRunner.j
ava:76)
        at
org.apache.activemq.broker.region.Queue.asyncWakeup(Queue.java:1637)
        at
org.apache.activemq.broker.region.Queue.expireMessages(Queue.java:773
)
        at org.apache.activemq.broker.region.Queue.access$100(Queue.java:83)
        at org.apache.activemq.broker.region.Queue$2.run(Queue.java:123)
        at
org.apache.activemq.thread.SchedulerTimerTask.run(SchedulerTimerTask.
java:33)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)
--------------------------------------------------------------------------------------------------

The config of my consumer as following:
--------------------------------------------------------------------------------------------------
<bean id="jmsConnectionFactory"
class="org.springframework.jms.connection.CachingConnectionFactory">
	<property name="targetConnectionFactory">
		<bean class="org.apache.activemq.ActiveMQConnectionFactory">
			<property name="brokerURL" value="tcp://localhost:61616" />
		</bean>
	</property>
	<property name="sessionCacheSize" value="50" />
</bean>

<bean id="jmsConfig" class="org.apache.cxf.transport.jms.JMSConfiguration"
	p:connectionFactory-ref="jmsConnectionFactory"
	p:targetDestination="test.queue"
/>

	
	<jaxws:endpoint xmlns:customer="http://customerservice.example.com/"
		id="CustomerServiceHTTP" address="jms://"
		implementor="com.example.customerservice.server.CustomerServiceImpl">
		<jaxws:features>
			<bean class="org.apache.cxf.feature.LoggingFeature" />
			<bean class="org.apache.cxf.transport.jms.JMSConfigFeature"
p:jmsConfig-ref="jmsConfig" />
		</jaxws:features>
	</jaxws:endpoint>
--------------------------------------------------------------------------------------------------

The config of my producer as following:
--------------------------------------------------------------------------------------------------
<bean id="jmsConnectionFactory"
class="org.springframework.jms.connection.SingleConnectionFactory">
	<property name="targetConnectionFactory">
		<bean class="org.apache.activemq.ActiveMQConnectionFactory">
			<property name="brokerURL" value="tcp://localhost:61616" />
		</bean>
	</property>
</bean>

<bean id="jmsConfig" class="org.apache.cxf.transport.jms.JMSConfiguration"
	p:connectionFactory-ref="jmsConnectionFactory"
	p:targetDestination="test.queue"
/>

	<jaxws:client id="customerService" 
		address="jms://" 
		serviceClass="com.example.customerservice.CustomerService">
		<jaxws:features>
			<bean class="org.apache.cxf.feature.LoggingFeature" />
			<bean class="org.apache.cxf.transport.jms.JMSConfigFeature"
p:jmsConfig-ref="jmsConfig" />
		</jaxws:features>
	</jaxws:client>
--------------------------------------------------------------------------------------------------

Jockey Yan




--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Broker-Scheduler-unable-to-create-new-native-thread-tp4656787.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message