CBL 1.x does not provide setter methods for this. Some of the users already change the value in their app. So we could not change them to final and/or private. The application directly set CouchbaseLiteHttpClientFactory.DEFAULT_SO_TIMEOUT_SECONDS = <any value>; before initializing the database.
If was 5 mins in 1.2.1 and now it is 40 seconds. Was there some specific issue due to which this has been reduced ?
We changed this value to 40sec because CBL library could not detect connection failure till timeout occurs if a server has an unexpected crash or unexpected connection failure occurs between client and server.
Note: I am wondering if CBL receives heart-beat from Sync Gateway every 30 sec. If CBL receives heart-beat correctly, the timeout should not occur.
Its not an issue with the heart beat. I am more concerned with the one shot where it gets 50k document ids and rev number. What if this number increases to 100k or more. That is where I think the issue it.
Secondly with a 16 GB Ram and and 8 core machine the Sync Gateway is taking above 80% of CPU. Even when the connections are very low. Can this be an issue ?