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 81C6E11152 for ; Tue, 23 Sep 2014 06:07:18 +0000 (UTC) Received: (qmail 66098 invoked by uid 500); 23 Sep 2014 06:07:18 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 66062 invoked by uid 500); 23 Sep 2014 06:07:18 -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 66051 invoked by uid 99); 23 Sep 2014 06:07:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Sep 2014 06:07:17 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,SPF_HELO_PASS,SPF_SOFTFAIL,URI_HEX,URI_TRY_3LD X-Spam-Check-By: apache.org Received-SPF: softfail (nike.apache.org: transitioning domain of venkatesh.sti120@gmail.com does not designate 162.253.133.43 as permitted sender) Received: from [162.253.133.43] (HELO mwork.nabble.com) (162.253.133.43) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Sep 2014 06:06:51 +0000 Received: from mjoe.nabble.com (unknown [162.253.133.57]) by mwork.nabble.com (Postfix) with ESMTP id 07DFF620304 for ; Mon, 22 Sep 2014 23:05:22 -0700 (PDT) Date: Mon, 22 Sep 2014 23:06:29 -0700 (PDT) From: venkatesh To: users@activemq.apache.org Message-ID: <1411452389654-4685778.post@n4.nabble.com> In-Reply-To: References: <1410333021584-4685440.post@n4.nabble.com> <1410424452088-4685470.post@n4.nabble.com> <1410776330409-4685545.post@n4.nabble.com> <1410937589408-4685624.post@n4.nabble.com> <1411042259869-4685691.post@n4.nabble.com> Subject: Re: what is the root cause and how to resolve the error i.e javax.jms.JMSException: No buffer space available (maximum connections reached? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi Tim, Please find more details related to this issue and also answers for your below questions Your Question: Was there anything unusual in the logs around the time the errors were seen? Answer: Actually No, But there is one scenario during our performance test where this issue occurs but it's not a valid scenario Your Question: Finally, your stack trace from several days ago shows that com.spacetimeinsight.alerts.util.MessagingUtils.sendMessage() calls org.apache.activemq.ActiveMQConnection.createSession(). Answer: Please find below code snippet once. try { ConnectionFactory connectionFactory = (ConnectionFactory) JNDIUtils.getJNDIResouceSource(resourceName); connection = connectionFactory.createConnection(); Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE); connection.start(); MessageProducer producer = session.createProducer((Destination) JNDIUtils.getJNDIResouceSource(destinationName)); producer.send(buildMessage(msg, msgType, session,props)); } catch (Exception e) { //some code here } finally { if (connection != null) { try { connection.close(); } catch (JMSException e) { // TODO Auto-generated catch block Logger.error("Exception is sendMessage while close connection ", MessagingUtils.class, e); } } Question: Do you create a new AMQ session for every message you send? Answer: Yes Question: Is there any caching/pooling being done? Answer: No Thanks, Venkatesh -- View this message in context: http://activemq.2283324.n4.nabble.com/what-is-the-Root-cause-and-how-to-resolve-the-error-i-e-javax-jms-JMSException-No-buffer-space-avail-tp4685440p4685778.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.