[Spread-users] Java - connection closed while reading data

Christopher Browne cbbrowne at ca.afilias.info
Thu Feb 7 12:19:12 EST 2008

Jonathan Stanton <jonathan at cnds.jhu.edu> writes:
> This error most commonly occurs when the client is not reading the
> messages fast enough from the server, so the server queues up
> messages (up to a limit) and then will close down the connection to
> the client since it has nowhere else to buffer messages for that
> particular client.

Thanks for the detail; I had "googled" for this, without success, so
there presumably wasn't a listing of the same error messages out there

> You can easily check if this is occuring. Just edit the spread.conf
> to add the SESSION type to the DebugFlags field so session errors
> are printed. Then look in the output for messages like:
> Sess_write: killing mbox %d for not reading

That's an error condition we'll need to watch for, thanks!

> If you see any of those then the recieving application was not
> keeping up with the sending rate and at least 1000 messages had been
> queued up for that receiver.

That is now obvious; I was pretty sure we were overrunning something,
this points me to exactly the right place.

> If you don't see that, then there might be another cause and I can
> suggest some more detailed event tracing to try and determine it.

It's not a *real* problem at this point; we're presently just doing
some "sample pounding against servers," and this gives some guidance
as to figuring the parameterization of where to expect things to break

> 2) You add flow control to your application so it doesn't send
> faster then the receivers can handle.
> Given your description of the problem it sounds to me like this
> might be the problem -- as when the 1000 messsages queue gets filled
> will depend on exactly how fast each program is running (scheduling
> delays and such will have an impact at these rates) so it could vary
> each run somewhat.

That definitely hits the nail on the head...
output = ("cbbrowne" "@" "acm.org")
"Just because it's free doesn't mean you can afford it."  -- Unknown

More information about the Spread-users mailing list