Can't Pull from the server

Hi @jens

I am also facing same issue that everything works fine when using Local Area Network but as soon as we go behind proxy the web socket feeds doesn’t work and 400 bad request error is thrown. We are using Microsoft TMG and dont have a work around to add web sockets to it.

We would like to have continuous replication. And push is working fine but pull throws the error. And it is due to web sockets. Is there an option to have continuous but no web sockets in IOS. Does description in following link is what I am asking: _changes?feed=websocket does not work with cbl1.2

In this following code is used I think to disable web sockets.
NSURL *syncUrl = [NSURL URLWithString:kSyncGatewayUrl];
_pull = [self.database createPullReplication:syncUrl];
_pull.continuous = YES;
if (!kSyncGatewayWebSocketSupport) {
_pull.customProperties = @{@“websocket”: @NO};
}

I would like to know harms of disabling the web sockets also, Will it decrease the speed?

Thanks in advance

Regards
Pankaj Sharma

Yes, setting that property in the replication settings will disable websockets, as described in the other thread.

Pull replication might have slightly higher latency, and slightly higher load on the server due to opening more HTTP connections, but it shouldn’t be a problem.

In the long run you should try to get the proxy upgraded to support WebSockets, as we are going to be doing more with the protocol in the future.

1 Like