Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3D8E5D646 for ; Thu, 27 Sep 2012 10:22:52 +0000 (UTC) Received: (qmail 2146 invoked by uid 500); 27 Sep 2012 10:22:51 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 1929 invoked by uid 500); 27 Sep 2012 10:22:51 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 1898 invoked by uid 99); 27 Sep 2012 10:22:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Sep 2012 10:22:51 +0000 X-ASF-Spam-Status: No, hits=1.6 required=5.0 tests=FREEMAIL_REPLY,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gaurav.cs.sharma@gmail.com designates 209.85.214.171 as permitted sender) Received: from [209.85.214.171] (HELO mail-ob0-f171.google.com) (209.85.214.171) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Sep 2012 10:22:46 +0000 Received: by obc16 with SMTP id 16so1723186obc.2 for ; Thu, 27 Sep 2012 03:22:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=JINF9c/D+SKtO5Ym7EG/nsPLlziWvrnuUVPRL2/ehi0=; b=xKSJ9aSMtImB1jbiKIm3ZrLvu6nXGNGAWP8fYLq0Akx14aOPbwfczB3Fz65jmPeBao 1KI06dZQPWngXdjDtedWLkTTAZGgNLUZ8LEX/Yheqefo+RYJPTBe1pPTkFavpUxDjDuG RU11n03ZQPk3pRjr6CZgbmaxzcFhT+vdqRtRJu3qUIZsgkF92AE9671rVtN+R/P5WIpI c1Fcfm8wWXzW/q9oGlZS8Q3ZIUwHAs4Ht8Jz8xdv2tvxJh4m4sevGs4NA9sTMN5p+rAf pgmsCHE6w5yTW9S/CkcKB1eQKVj7KtvyJWh656NrvLBZXuHktnAF2vreLSZJ/jeqAYOr CqZw== Received: by 10.182.18.143 with SMTP id w15mr2740239obd.6.1348741345428; Thu, 27 Sep 2012 03:22:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.115.234 with HTTP; Thu, 27 Sep 2012 03:21:45 -0700 (PDT) In-Reply-To: References: <1348209293639-4656787.post@n4.nabble.com> <3AF6A3D6-5EE3-47C3-A7B7-A662352DACC3@gmail.com> From: Gaurav Sharma Date: Thu, 27 Sep 2012 03:21:45 -0700 Message-ID: Subject: Re: ActiveMQ Broker Scheduler unable to create new native thread To: users@activemq.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Your memoryUsage limit is only 256megs; bump it up. Some more pointers here: http://activemq.apache.org/javalangoutofmemory.html On Thu, Sep 27, 2012 at 3:11 AM, jockeyyan wrote: > Hi Gaurav: > > It seems the ActiveMQ is not stable, from 5.4.3 to 5.6.0, and I tried > many times, and it always throw "unable to create new create native > thread", Does anyone know how to solve it? > > my AMQ configuratoin of activemq.xml as following: > -------------------------------------------------------------------------= -------- > > > xmlns=3D"http://www.springframework.org/schema/beans" > xmlns:amq=3D"http://activemq.apache.org/schema/core" > xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation=3D"http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans-2.0.xsd > http://activemq.apache.org/schema/core > http://activemq.apache.org/schema/core/activemq-core.xsd"> > > > > > file:${activemq.base}/conf/credentials.properties > > > > > brokerName=3D"localhost" dataDirectory=3D"${activemq.base}/data" > persistent=3D"true" destroyApplicationContextOnStop=3D"true"> > > > > > > > " producerFlowControl=3D"false" > memoryLimit=3D"16mb"> > > > > > > " producerFlowControl=3D"false" > memoryLimit=3D"16mb"> > > > > > > > > > > > > > > > > > uri=3D"static:(nio://192.= 168.128.184:61616)" > duplex=3D"true" /> > > > > > > > > > > > > > > > > > > > > > > > > > > > uri=3D"nio://0.0.0.0:6262= 6" /> > > > > > > > > > > -------------------------------------------------------------------------= ----------------------------------- > > > Very urgent, thanks! > > > 2012/9/22 Gaurav Sharma [via ActiveMQ] > : >> For starters, simply give it more heap. So, increase heap as a step func= tion >> (1G, 1.5G, 2G...) and measure throughput. Throughput sustenance will als= o >> depend on message size and how well both the broker and clients keep up. >> >> On Sep 21, 2012, at 18:49, jockeyyan <[hidden email]> wrote: >> >>> Dear Gaurav: >>> >>> The configuration parameters of my broker as following: >>> >>> -----------------------------------------------------------------------= ---------------------------- >>> ACTIVEMQ_OPTS=3D-Xmx512M >>> -Dorg.apache.activemq.UseDedicatedTaskRunner=3Dfalse >>> -Djava.util.logging.config.file=3Dlogging.properties -Xss256k >>> >>> -----------------------------------------------------------------------= ---------------------------- >>> There are 1 CPU of 4 kernels and 6G memory on this machine, and no >>> other app is running. >>> >>> >>> 2012/9/21 Gaurav Sharma [via ActiveMQ] >>> <[hidden email]>: >>>> How much heap have we given to the broker and what else is running on = the >>>> same machine? Also, just fire up jconsole, attach to the process and >>>> watch >>>> allocations, threads and cpu - should give a clue. v5.6 is the current >>>> release, so, upgrade if possible. >>>> >>>> On Sep 20, 2012, at 23:34, jockeyyan <[hidden email]> wrote: >>>> >>>>> 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 consume= r >>>>> 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: >>>>> >>>>> >>>>> ---------------------------------------------------------------------= ----------------------------- >>>>> >>>> class=3D"org.springframework.jms.connection.CachingConnectionFactory"= > >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>> class=3D"org.apache.cxf.transport.jms.JMSConfiguration" >>>>> p:connectionFactory-ref=3D"jmsConnectionFactory" >>>>> p:targetDestination=3D"test.queue" >>>>> /> >>>>> >>>>> >>>>> >>>> id=3D"CustomerServiceHTTP" address=3D"jms://" >>>>> >>>>> implementor=3D"com.example.customerservice.server.CustomerServiceImpl= "> >>>>> >>>>> >>>>> >>>> p:jmsConfig-ref=3D"jmsConfig" /> >>>>> >>>>> >>>>> >>>>> >>>>> ---------------------------------------------------------------------= ----------------------------- >>>>> >>>>> The config of my producer as following: >>>>> >>>>> >>>>> ---------------------------------------------------------------------= ----------------------------- >>>>> >>>> class=3D"org.springframework.jms.connection.SingleConnectionFactory"> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>> class=3D"org.apache.cxf.transport.jms.JMSConfiguration" >>>>> p:connectionFactory-ref=3D"jmsConnectionFactory" >>>>> p:targetDestination=3D"test.queue" >>>>> /> >>>>> >>>>> >>>> address=3D"jms://" >>>>> serviceClass=3D"com.example.customerservice.CustomerService"> >>>>> >>>>> >>>>> >>>> p:jmsConfig-ref=3D"jmsConfig" /> >>>>> >>>>> >>>>> >>>>> >>>>> ---------------------------------------------------------------------= ----------------------------- >>>>> >>>>> Jockey Yan >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> View this message in context: >>>>> >>>>> http://activemq.2283324.n4.nabble.com/ActiveMQ-Broker-Scheduler-unabl= e-to-create-new-native-thread-tp4656787.html >>>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >>>> >>>> >>>> ________________________________ >>>> If you reply to this email, your message will be added to the discussi= on >>>> below: >>>> >>>> http://activemq.2283324.n4.nabble.com/ActiveMQ-Broker-Scheduler-unable= -to-create-new-native-thread-tp4656787p4656820.html >>>> To unsubscribe from ActiveMQ Broker Scheduler unable to create new nat= ive >>>> thread, click here. >>>> NAML >>> >>> >>> >>> -- >>> =E9=97=AB=E7=BB=A7=E5=9F=B9 >>> Jockey Yan >>> >>> Email: [hidden email] >>> Mobile: 13601186611 >>> >>> >>> >>> >>> -- >>> View this message in context: >>> http://activemq.2283324.n4.nabble.com/ActiveMQ-Broker-Scheduler-unable-= to-create-new-native-thread-tp4656787p4656827.html >> >>> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >> >> >> ________________________________ >> If you reply to this email, your message will be added to the discussion >> below: >> http://activemq.2283324.n4.nabble.com/ActiveMQ-Broker-Scheduler-unable-t= o-create-new-native-thread-tp4656787p4656828.html >> To unsubscribe from ActiveMQ Broker Scheduler unable to create new nativ= e >> thread, click here. >> NAML > > > > -- > =E9=97=AB=E7=BB=A7=E5=9F=B9 > Jockey Yan > > Email: jockeyyan@gmail.com > Mobile: 13601186611 > > > > > -- > View this message in context: http://activemq.2283324.n4.nabble.com/Activ= eMQ-Broker-Scheduler-unable-to-create-new-native-thread-tp4656787p4657080.h= tml > Sent from the ActiveMQ - User mailing list archive at Nabble.com.