On Jul 15, 2014, at 2:30 PM, Andrew <[email protected]> wrote:

> I guess it's possible that something along the way (NAT router or AWS maybe) 
> is actively involved in the socket and is hauling down what it considers to 
> be an inactive connection/translation.

I recall another developer having issues with AWS closing idle sockets; but in 
that case I think it was clear to both sides of the connection what happened 
(the socket was explicitly closed, instead of packets just not arriving any 
longer.) So this seems different.

> Is there any way of adjusting the Sync Gateway heartbeat without rebuilding 
> it to see if that's the case?

The heartbeat interval is actually a parameter sent by the client in the 
request for the changes feed. It's exposed in the API as an optional property 
you can set in the CBLReplication's options dictionary, 
kCBLReplicatorOption_Heartbeat. The value is an NSNumber whose units are 
milliseconds.

> Ah. But, more generally, isn't that exactly what CBL should be managing? By 
> definition, it's going to be running on devices that are likely to have less 
> than perfect connections. In that scenario, the passive WebSocket mode, where 
> CBL takes no responsibility for checking the connection or attempting its own 
> heartbeat, seems destined to go horribly wrong at some point! Or am I missing 
> something obvious?

Yes, you're right. But I don't remember another case where there's trouble 
because of packets just getting dropped. Usually if there's a situation like 
that (like losing connectivity) the network interface state will change, which 
CBL will detect and automatically take the replication offline. I'm not sure 
what's going on here.

--Jens

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/81960133-7D6F-472D-B2C2-95010012E2B3%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to