activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Bain <tb...@alumni.duke.edu>
Subject Re: org.apache.commons.httpclient.ConnectionPoolTimeoutException: Timeout waiting for connection
Date Mon, 29 Sep 2014 16:34:25 GMT
It looks like you're failing to get an HTTP connection in one of your
routes.  Four of the six endpoints you listed use HTTP; have you been able
to figure out which of them is the one you're failing on, and whether
there's anything unusual about hitting that endpoint?  When this fails, are
you processing lots of messages in parallel, where each would be trying to
get an HTTP connection?  If so and if you have substantially more messages
to process, you'd run out of HTTP connections and the other threads would
need to wait for one to become available, which might not happen if there
were enough simultaneous requests or if the HTTP request was very slow...

On Fri, Sep 26, 2014 at 12:56 PM, ahsanali <smartworkdud@gmail.com> wrote:

> technology version I have used:
> <pre>
> 1. jdk 1.6
> 2. spring 3
> 3. activemq-core 5.4.1
> 4. camel-core 2.5.0
> </pre>
> I have used below configuration in application context for activemq pool
> and
> jms configuration
>
>
>
> > <bean id="pooledConnectionFactory"
> > class="org.apache.activemq.pool.PooledConnectionFactory"
> > init-method="start" destroy-method="stop">
>                    <property name="maxConnections" value="30" />
>                    <property name="connectionFactory"
> ref="jmsConnectionFactory" />
>                 </bean>
>
>                 <bean id="jmsConfig"
> class="org.apache.camel.component.jms.JmsConfiguration">
>                    <property name="connectionFactory"
> ref="pooledConnectionFactory"/>
>                    <property name="concurrentConsumers" value="10"/>
>                 </bean>
> <pre>
> As per my analysis I found that issue is with activemq routing but we are
> not getting exactly root cause and solution.
> Any suggestion is appreciated,I am new to activeMQ.
> Also please note I have defined routing url in config() method of my
> custome
> class.
> <pre>
> like
>
>     private final JaxbDataFormat jaxb = new
> JaxbDataFormat("com.example.prototrans.message.model.promptserver");
>
>
> from(endpointSmppSub).
>                         to("smppMoRequestProcessor").
>                         to(QUEUE_MO_REQUESTS);
>
>                 from(QUEUE_MO_REQUESTS).
>                         to("promptServerMoRequestProcessor").
>                         to(endpointPromptServerSub).
>                         unmarshal(jaxb).
>                         to("promptServerMoResponseProcessor").
>                         to("smppMoResponseProcessor").
>                         to(endpointSmppSub);
>
>                 from(endpointUssdPushSubEN).
>                 unmarshal(jaxb).to("smsPushProcessor");
>
>
>                 from(endpointSmppPos).
>                         to("smppMoRequestProcessor").
>                         to(QUEUE_8_MO_REQUESTS);
>                         from(QUEUE_8_MO_REQUESTS).
>                         to("promptServerMoRequestProcessor").
>                         to(endpointPromptServerPos).
>                         unmarshal(jaxb).
>                         to("promptServerMoResponseProcessor").
>                         to("smppMoResponseProcessor")
>                         .to(endpointSmppPos);
>                                 from(endpointUssdPushMerEN).
>                 unmarshal(jaxb).to("smsPushProcessor");
>
>
> I am getting below Exception:
>
>     org.apache.commons.httpclient.ConnectionPoolTimeoutException: Timeout
> waiting for connection
>         at
>
> org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.doGetConnection(MultiThreadedHttpConnectionManager.java:497)
>         at
>
> org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.getConnectionWithTimeout(MultiThreadedHttpConnectionManager.java:416)
>         at
>
> org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:153)
>         at
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
>         at
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
>         at
>
> org.apache.camel.component.http.HttpProducer.executeMethod(HttpProducer.java:180)
>         at
> org.apache.camel.component.http.HttpProducer.process(HttpProducer.java:94)
>         at
>
> org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)
>         at
>
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)
>         at
>
> org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104)
>         at
>
> org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)
>         at
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)
>         at
>
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)
>         at
>
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
>         at
>
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
>         at
>
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
>         at
>
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)
>         at
>
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
>         at
>
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
>         at
>
> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)
>         at
>
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)
>         at
>
> org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)
>         at
>
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)
>         at
> org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:256)
>         at
>
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)
>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:143)
>         at org.apache.camel.processor.Pipeline.process(Pipeline.java:78)
>         at
>
> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:99)
>         at
>
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)
>         at
>
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
>         at
>
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
>         at
>
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
>         at
>
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:91)
>         at
>
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:85)
>         at
>
> org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:91)
>         at
>
> org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:560)
>         at
>
> org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:498)
>         at
>
> org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:467)
>         at
>
> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:323)
>         at
>
> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:261)
>         at
>
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1056)
>         at
>
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1048)
>         at
>
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:947)
>         at java.lang.Thread.run(Thread.java:662)
>
>
>
>
> > also I found same here but not relevant to my issue
> [org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for
> connection from pool [duplicate]][1]
>
>
> [httpclient exception “org.apache.http.conn.ConnectionPoolTimeoutException:
> Timeout waiting for connection”][2]
>
>
>   [1]:
>
> http://stackoverflow.com/questions/16019612/org-apache-http-conn-connectionpooltimeoutexception-timeout-waiting-for-connect
>   [2]:
>
> http://stackoverflow.com/questions/11875015/httpclient-exception-org-apache-http-conn-connectionpooltimeoutexception-timeo
>
>
>
> routes.endpointSmppSub=smpp://
> docmm@196.201.51.133:5640?password=docmm&serviceType=USSD&sourceAddrTon=0&sourceAddrNpi=0&enquireLinkTimer=10000&transactionTimer=5000&sourceAddr=564&systemType=USSD
>
> routes.endpointPromptServerSub=
> http://example.ussd:9080/ussd_prompt_server/XmlProtocolController
>
> routes.endpointUssdPushSubEN=jetty:
> http://example.ussd:8089/ussd_protocol_server/outboundsmppMessageAdapter
>
>
> routes.endpointSmppPos=smpp://
> docmm2@196.201.51.133:5680?password=docmm2&serviceType=USSD&sourceAddrTon=0&sourceAddrNpi=0&enquireLinkTimer=10000&transactionTimer=5000&sourceAddr=568&systemType=USSD
>
> routes.endpointPromptServerPos=
> http://example.ussd:9080/pos_ussd_prompt_server/XmlProtocolController
>
> routes.endpointUssdPushMerEN=jetty:
> http://example.ussd:8089/pos_ussd_protocol_server/outboundsmppMessageAdapter
>
>
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/org-apache-commons-httpclient-ConnectionPoolTimeoutException-Timeout-waiting-for-connection-tp4685923.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message