There's a good FAQ entry to help: 
http://activemq.apache.org/how-do-i-configure-10s-of-1000s-of-queues-in-a-single-broker-.html

On 6 Oct 2009, at 20:34, Dan Tran wrote:


Sound like you have the classical slow consumer fast producer problem. Read
up on producer flow control feature, prefetchSize, etc.

-Dan


jimmymartin wrote:

Hello,

I'm running a 5.2.0 broker that throws the error below after about 2 days of running. I've seen some discussion from previous posts indicating that changing the thread stack size via -Xss is the solution. Does anyone have
a suggestion as to the 'best' setting for this value for an activemq
broker? The default value appears to be 256K, at least for the Sun JVM.

Also if there are any other configuration tweaks that could alleviate this
problem, please let me know.

I have single broker with about 22 queues and approximately 24 connections per queue handling some 50 to 100 events per second. I'm using an IBM 1.5
JVM on Linux. I've set the max heap size to 1024M.

Any help would be appreicated.

Thanks, Jimmy

2009-10-04 06:43:11,406 [190.39.16:52113] ERROR Service
- Async error occurred: java.lang.OutOfMemoryError: Failed to fork OS
thread
java.lang.OutOfMemoryError: Failed to fork OS thread
        at java.lang.Thread.startImpl(Native Method)
        at java.lang.Thread.start(Thread.java:970)
        at
java .util .concurrent .ThreadPoolExecutor .addIfUnderMaximumPoolSize(ThreadPoolExecutor.java:470)
        at
java .util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java: 878)
        at
org .apache .activemq.thread.PooledTaskRunner.wakeup(PooledTaskRunner.java:76)
        at
org .apache .activemq .store.amq.AMQMessageStore.removeMessage(AMQMessageStore.java:276)
        at
org .apache .activemq .store.amq.AMQMessageStore.removeMessage(AMQMessageStore.java:213) at org.apache.activemq.broker.region.Queue.acknowledge(Queue.java: 504) at org.apache.activemq.broker.region.Queue.removeMessage(Queue.java: 1071)
        at
org .apache .activemq .broker.region.QueueSubscription.acknowledge(QueueSubscription.java: 51)
        at
org .apache .activemq .broker .region.PrefetchSubscription.acknowledge(PrefetchSubscription.java: 238)
        at
org .apache .activemq .broker.region.AbstractRegion.acknowledge(AbstractRegion.java:373)
        at
org .apache .activemq.broker.region.RegionBroker.acknowledge(RegionBroker.java: 462)
        at
org .apache .activemq .broker.TransactionBroker.acknowledge(TransactionBroker.java:194)
        at
org .apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java: 74)
        at
org .apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java: 74)
        at
org .apache .activemq .broker.MutableBrokerFilter.acknowledge(MutableBrokerFilter.java:85)
        at
org .apache .activemq .broker .TransportConnection.processMessageAck(TransportConnection.java:456)
        at org.apache.activemq.command.MessageAck.visit(MessageAck.java:205)
        at
org .apache .activemq .broker.TransportConnection.service(TransportConnection.java:305)
        at
org.apache.activemq.broker.TransportConnection $1.onCommand(TransportConnection.java:179)
        at
org .apache .activemq.transport.TransportFilter.onCommand(TransportFilter.java: 68)
        at
org .apache .activemq .transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java: 143)
        at
org .apache .activemq .transport.InactivityMonitor.onCommand(InactivityMonitor.java:206)
        at
org .apache .activemq .transport.TransportSupport.doConsume(TransportSupport.java:84)
        at
org .apache .activemq.transport.tcp.SslTransport.doConsume(SslTransport.java:104)
        at
org .apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java: 203)
        at
org .apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java: 185)
        at java.lang.Thread.run(Thread.java:803)



--
View this message in context: 
http://www.nabble.com/ava.lang.OutOfMemoryError%3A-Failed-to-fork-OS-thread---5.2.0-broker-tp25774586p25775235.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Rob Davies
http://twitter.com/rajdavies
I work here: http://fusesource.com
My Blog: http://rajdavies.blogspot.com/
I'm writing this: http://www.manning.com/snyder/





Reply via email to