You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Stefan Gmeiner (JIRA)" <ji...@apache.org> on 2008/03/04 12:17:35 UTC

[jira] Commented: (AMQ-1603) EOFExceptions and Broken Pipe exceptions everywhere in 5.0 (my services seem to run fine under 4.1 and 4.1.1 and somewhat better in 5.1-SNAPSHOT [if you don't count the queue size problem] which is critical)

    [ https://issues.apache.org/activemq/browse/AMQ-1603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41511#action_41511 ] 

Stefan Gmeiner commented on AMQ-1603:
-------------------------------------

I have the same exception metioned above. I've invested some time to trace the
cause because I haven't found a solution to this problem. I'm attaching a very
small patch for the InactivityMonitor which solves the problem for me
completly, but I don't know if this is the right way to solve it.

Some explaination to the patch:

The InactivityMonitor schedules two tasks. One is called every t ms and checks
if a message has been received since the last call. If this is not the
case an InactivityException is thrown.

The second task is called every t/2 ms and checks if a message was sent since
the last call. If this wasn't the case it sends a KeepAliveInfo AND sets the
send-flag which in turn prevents the next call from the sending this message
again.

When no application messages are sent or received a KeepAliveInfo is sent every
t ms. But the receiver also expects to receive a message every t ms . Now it is
a sole matter of timing until the KeepAliveInfo is sent some ms too late for
the receiver and the connection is closed by mistake.

{noformat}
Index: activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java
===================================================================
--- activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java    (Revision 633376)
+++ activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java    (Arbeitskopie)
@@ -157,7 +157,9 @@
                 next.oneway(o);
             }
         } finally {
-            commandSent.set(true);
+            if (o.getClass() != KeepAliveInfo.class) {
+                commandSent.set(true);
+            }
             inSend.set(false);
         }
     }
{noformat}

> EOFExceptions and Broken Pipe exceptions everywhere in 5.0 (my services seem to run fine under 4.1 and 4.1.1 and somewhat better in 5.1-SNAPSHOT [if you don't count the queue size problem] which is critical)
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-1603
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1603
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.0.0
>            Reporter: Denis Abramov
>            Priority: Blocker
>
> I keep getting these errors when any of my services startup... This version doesn't look too stable.
> javax.jms.JMSException: java.io.EOFException
> 	at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49)
> 	at org.apache.activemq.ActiveMQConnection.onAsyncException(ActiveMQConnection.java:1642)
> 	at org.apache.activemq.ActiveMQConnection.onException(ActiveMQConnection.java:1659)
> 	at org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:98)
> 	at org.apache.activemq.transport.ResponseCorrelator.onException(ResponseCorrelator.java:116)
> 	at org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:98)
> 	at org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:98)
> 	at org.apache.activemq.transport.WireFormatNegotiator.onException(WireFormatNegotiator.java:143)
> 	at org.apache.activemq.transport.InactivityMonitor.onException(InactivityMonitor.java:169)
> 	at org.apache.activemq.transport.TransportSupport.onException(TransportSupport.java:95)
> 	at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:176)
> 	at java.lang.Thread.run(Thread.java:595)
> Caused by: java.io.EOFException
> 	at java.io.DataInputStream.readInt(DataInputStream.java:358)
> 	at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:268)
> 	at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:192)
> 	at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:184)
> 	at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:172)
> 	... 1 more
> and this one:
> javax.jms.JMSException: Channel was inactive for too long: puccell/10.0.55.197:61616
> 	at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49)
> 	at org.apache.activemq.ActiveMQConnection.onAsyncException(ActiveMQConnection.java:1642)
> 	at org.apache.activemq.ActiveMQConnection.onException(ActiveMQConnection.java:1659)
> 	at org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:98)
> 	at org.apache.activemq.transport.ResponseCorrelator.onException(ResponseCorrelator.java:116)
> 	at org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:98)
> 	at org.apache.activemq.transport.TransportFilter.onException(TransportFilter.java:98)
> 	at org.apache.activemq.transport.WireFormatNegotiator.onException(WireFormatNegotiator.java:143)
> 	at org.apache.activemq.transport.InactivityMonitor.onException(InactivityMonitor.java:169)
> 	at org.apache.activemq.transport.InactivityMonitor$4.run(InactivityMonitor.java:108)
> Caused by: org.apache.activemq.transport.InactivityIOException: Channel was inactive for too long: puccell/10.0.55.197:61616
> 	... 1 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.