qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajith Attapattu <rajit...@gmail.com>
Subject Re: Connection: read timed out
Date Thu, 11 Feb 2010 17:50:04 GMT
On Thu, Feb 11, 2010 at 11:15 AM, Jen Andre <jandre@gmail.com> wrote:
> "The "Read timed out" is due to the java client not receiving anything
> from the broker for two consecutive heartbeats. "
> It seems from the inner exception (java.net.SocketTimeoutException: Read
> timed out) that the error is a TCP/IP socket timeout... I added some code to
> the that prints out SO_TIMEOUT and that seems to be set to 0 (unlimited) so
> it is indeed strange.

Yes it should be a SocketTimeoutException. That is how we handle the heartbeat.
I set the so_timeout to twice the value of the heartbeat interval.
The so_timeout should not be zero.
In your case, since the heartbeat interval is 120 secs, the so_timeout
should be 240 secs.
So the socket should only through a read timeout if it doesn't see
anything on the pipe for 240 secs.

> This happens reliably (every single time it runs) *only* on this one
> machine.
> "However you mentioned that if you run the java client from another
> machine it doesn't happen. What is the difference btw these two
> machines? "
> In reality, I'm not sure what the difference is between the machines... they
> are both RHEL Linux VM images that started out the same, but one is in our
> QA environment.  The JVM is the exact same.   I can investigate CPU and
> load, but I imagine they would not be too high since neither is production
> (a quick netstat and lsof doesn't indicate a bizarre # of sockets open).
> Running the code from a windows machine connecting to linux broker results
> in no timeouts either.

We've had other clients using the heartbeats successfully and it seems
that it works well in your other env.
So it could be related to the environment.

Would you like to disable the heartbeats on this env and try?
However you would need to use the trunk version as there is bug in 0.5
and 0.6 where heartbeats cannot be disabled :(

You can disable the heartbeats as follows

As Broker property in the connection URL

Or as a System property

Lets us know how it goes.



> --
> View this message in context: http://n2.nabble.com/Connection-read-timed-out-tp4544370p4555517.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org


Rajith Attapattu
Red Hat

Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org

View raw message