Re: Periodic refresh causing server "Read timed out"

Posted by ncrofts on
URL: https://discuss.orbeon.com/Periodic-refresh-causing-server-Read-timed-out-tp45294p45309.html

Hi,

I'm really struggling to find a solution for this "Read timed out" issue. I've a few more observations that I was hoping might shed some light on the cause and perhaps lead to ideas for a solution.

Firstly, it is not container specific as the problem occurs when using tomcat or jetty.

Secondly, it appears to be linked to bandwidth, or rather lack of it. When running between two machines on a local area network the problem does not appear to happen. However when run across the Internet the problem does manifest itself. In particular the problem occurs much more rapidly if the server is running on a machine with low bandwidth. For example, when run on a machine with a domestic ADSL connection (download ~4Mbs, upload ~ 350 kbs) the problem shows up almost immediately. This is the reverse of my original scenario where a fast, high bandwidth server was talking to the lower bandwidth client. In that scenario the problem took several hours to show itself.

I've noticed also that a low bandwidth mobile broadband client (down/upload < 350 Kbs) also fails to work most of the time too.

I've been searching around for other situations where people encounter "Read timed out" issues and the closest sounding scenario is the following: http://www.nabble.com/question-:-encounter-java.net.SocketTimeoutException:-Read-timed-out-occasionally-td19326602.html

This seems to imply the Keep-Alive header may be part of the issue, but so far I've not been able to prove this has any impact.

Anyway, I was wondering if any of the above gives any ideas for what is going wrong.  If this really is a bandwidth related issue then this must surely be an issue that will eventually bite other application developers too.

Thanks in advance for any thoughts on this.

Neil



ncrofts wrote
Alex,

Thanks for the further advice. I've installed ieHttpHeaders and have attached a file containing the output from a test run that eventually ended in a "Read timed out" error. It seems that the page refreshes are taking place as normal, until the error occurs at which point there doesn't appear to be any data posted.

ieHttpHeaders_ReadTimedOut.txtoccurs

Can you see anything indicating a problem in this?

I've had a look again at orbeon.log too. It seems ok until the exception occurs and the stack trace I've posted previously is output.

Regards,
Neil

Alessandro Vernet wrote
Neil,

ncrofts wrote
Thanks for trying this. I haven't been able to see any obvious pattern when it comes to the interval. I've tried reducing it down to 5 second intervals and the fault does occur, but anecdotally it doesn't seem to cause the fault any more frequently. For the test I left it at 30 seconds to reflect the real scenario we need to use.
OK, even if anecdotal, this is interesting.

ncrofts wrote
Anyway, thanks in advance for sharing your results.
I left the page running for about 2 hours on a machine running IE6 but haven't seen the "read timeout" message so far. I am wondering what the server returns, if anything, when this "read timeout" error occurs. Could you try installing ieHTTPHeaders (http://wiki.orbeon.com/forms/doc/developer-guide/monitoring-http-requests) on IE, and run the test again on your side? ieHTTPHeaders should also log the Ajax requests. Maybe seeing what the request/response is when it fails will help. Also, when it fails, you might want to check the orbeon.log on the server to see if you see anything unusual there.

Alex