Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Fwd: occasional earlyEOF exceptions

Hi,

On Sun, Jul 30, 2017 at 4:38 PM, Bert Robben <bert.robben@xxxxxxxxx> wrote:
> Hi all,
>
> we have an application where one part uses the jetty httpclient to
> communicate with another part that runs a jetty http server.
>
> Both run version 9.4.2.v20170220.
>
> What I observe is that we very occasionally get an earlyEOF exception (see
> example stacktrace below).
>
> What can I do to fix this? Is it safe to just retry and assume the request
> has not reached the server?
>
>
> Some more observations:
> - we're not using https
> - client and server are running "close" to each other (both machines in the
> same office)
> - the client is making repeated calls to the server (same url)
> - it happens very sporadically (1 call in a 100K ?)
> - it looks like https://bugs.eclipse.org/bugs/show_bug.cgi?id=434414. There
> was a kind of fix for this
> (https://bugs.eclipse.org/bugs/show_bug.cgi?id=476170), but I don't know how
> to apply it since I can't find anything about
> "HttpClient.validateConnections".
> - we're using async request/response
> - I don't see any stack traces on the server side

This problem typically happens when client and server have the same
idle timeout.
One connection is idling out, the client grabs it to send a request
exactly at the same moment the server has decided to close it due to
inactivity.
The solution is simple: set the server idle timeout larger than the client's.

Bugs #434414 and #476170 refer to non-compliant servers, and if you
use Jetty on the server they won't happen.

Try the idle timeout settings above, and your problem should go away.

-- 
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.


Back to the top