Hello,
On Jun 18, 2009, at 11:04 , Patrick Ohly wrote:
Intel QA found that SyncEvolution can get stuck waiting for a response
basically forever when the network connection goes down temporarily
and
the server gives up sending the response to the POST during that time,
leading to a half-open TCP connection on the client with no progress.
See http://bugzilla.moblin.org/show_bug.cgi?id=3427
I checked whether SO_KEEPALIVE probes would help, but because of the
long timeout (2 hours on Linux) which cannot be reduced on a per-
socket
basis, this isn't a feasible solution to detect the problem in an
interactive app in a reasonable amount of time.
What is Synthesis doing to handle this problem? We would need a
"keepalive" probe at the SyncML level, but I don't think there is
such a
thing, is it?
Not that I knew of.
What our SyncML clients do is timing out the wait for data after a 5
minutes or so, and then run a retry (send same message again). Servers
should be able to handle that - Nokia started doing this years ago as
a way to increase stability. Our server simply buffers the last
response, and when it receives a message it detects as a resend of an
already answered message (by MsgID), it just re-sends the buffered
response.
The timeout could also be shorter, because especially SonyEricsson
clients exist that have very little patience (around 30 secs), so
again, servers will ensure that they can answer within 30 secs. Our
server has one operation that could take longer for huge datasets
(loading the sync set for a slow sync), and solves the problem by
sending "empty" responses (just non-<final/>, with Alert 222 when
needed) at least every 30 seconds (configurable, of course :-) while
the sync set loading is in progress.
This approach has proven robust, we did many tests with ripping a
device out of it's USB cradle connection in mid-sync and when wireless
network was established the sync session continued on a new
connection, of course with some retries (message resends).
I can imagine that sending garbage POST requests to the sync URL might
work: the expectation is that a reply to those must be received
quickly,
if not, then we can assume that the network or server is down.
Yeah, probably. But I would not make such assumptions unless it's the
very last resort - you never know what weird server designs you'll
find out in the wild :-)
Best Regards,
Lukas Zeller ([email protected])
-
Synthesis AG, SyncML Solutions & Sustainable Software Concepts
[email protected], http://www.synthesis.ch
_______________________________________________
os-libsynthesis mailing list
[email protected]
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis