activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul French <paul.fre...@frenchiesystems.com>
Subject Async Exception: Broken Pipe
Date Fri, 02 Feb 2007 12:07:16 GMT

Hello,

I have a single client laptop that connects to the broker on another
machine, creates a temp queue and sends text messages to a main queue. The
client also starts a listener consumer to consume the replies given on the
temp queue.

The server consumes messages from the main queue does some processing and
then replies on the temp queue.

The server runs with a pre-configured number of threads. Each thread does
the following:

    connection = connectionFactory.createConnection();
    session = connection.createSession(false,Session.CLIENT_ACKNOWLEDGE);
    consumer = session.createConsumer(mainQueueName);
    producer = session.createProducer(null); // set as null since we do not
know the destination until runtime
    connection.start();

The connection details are as follows:

  <bean id="connectionFactory"
class="org.springframework.jms.connection.SingleConnectionFactory"
destroy-method="destroy">
    <property name="targetConnectionFactory">
      <bean class="org.apache.activemq.ActiveMQConnectionFactory">
        <property name="brokerURL"
value="tcp://localhost:61616?jms.prefetchPolicy.queuePrefetch=1" />
        <property name="useAsyncSend"><value>TRUE</value></property>
      </bean>
    </property>
  </bean>

When I run with 6 threads I'm usually okay. When I run the server above 7
threads I get the following Exception

Async exception with no exception listener: java.net.SocketException: Broken
pipe
java.net.SocketException: Broken pipe
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
        at
org.apache.activemq.transport.tcp.TcpBufferedOutputStream.flush(TcpBu
fferedOutputStream.java:109)
        at java.io.DataOutputStream.flush(DataOutputStream.java:106)
        at
org.apache.activemq.transport.tcp.TcpTransport.oneway(TcpTransport.ja
va:119)
        at
org.apache.activemq.transport.InactivityMonitor.writeCheck(Inactivity
Monitor.java:81)
        at
org.apache.activemq.transport.InactivityMonitor.access$100(Inactivity
Monitor.java:35)
        at
org.apache.activemq.transport.InactivityMonitor$2.run(InactivityMonit
or.java:57)
        at
edu.emory.mathcs.backport.java.util.concurrent.Executors$RunnableAdap
ter.call(Executors.java:431)
        at
edu.emory.mathcs.backport.java.util.concurrent.FutureTask.runAndReset
(FutureTask.java:198)
        at
edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExe
cutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:189)
        at
edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExe
cutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:213)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor
ker.runTask(ThreadPoolExecutor.java:650)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Wor
ker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)


Once I get this exception no threads can process any messages. Any ideas?
What does this Exception message imply? I am running ActiveMQ 4.1.0.

The server machine I am using supports 24 simultaneous threads and I want to
get up to this number since each server request takes considerable time to
process and is highly computational.

I am running the broker on the server at the moment. In the meantime I will
move the broker on to a different machine to see if that alliviates the
problem.
-- 
View this message in context: http://www.nabble.com/Async-Exception%3A-Broken-Pipe-tf3160498.html#a8765808
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message