Hello,
i’m starting using sync gateway in a staging test, with at most 10-15 android app connected.
I’m using couchbase lite 2.0, couchbase community 5.1.1 and sync gateway 2, in an ubuntu 18.04 environment with 16GB ram and dual core Intel® Xeon®.
When i start the main activity, as docs, i open a continuous replication:
...
private void setReplicator () {
try {
URI uri = new URI(REPLICATION_URL);
Endpoint endpoint = new URLEndpoint(uri);
ReplicatorConfiguration replConfig = new ReplicatorConfiguration(MyDatabase.getInstance().getDatabase(), endpoint);
replConfig.setContinuous(true);
List<String> channels = Channels.getChannels();
replConfig.setChannels(channels);
String user = BuildConfig.COUCHBASE_USERNAME;
String password = BuildConfig.COUCHBASE_PASSWORD;
Authenticator auth = new BasicAuthenticator(user, password);
replConfig.setAuthenticator(auth);
mReplicator = new Replicator(replConfig);
mReplicator.addChangeListener(new ReplicatorChangeListener() {
@Override
public void changed(ReplicatorChange change) {
mReplicatorStatus = change.getReplicator().getStatus().getActivityLevel();
Log.d("REPLICATORSTATUS", mReplicatorStatus.toString());
}
});
mReplicator.start();
} catch (URISyntaxException e) {
e.printStackTrace();
}
}
...
In development stage i didn’t have any issue, but now having multiple app connected i’m start noticing in sync_gatewa_logs.json
those messages:
--> BLIP+WebSocket connection error: read tcp X.X.X.X:4984->X.X.X.X:17634: read: connection reset by peer
--> BLIP+WebSocket connection error: read tcp X.X.X.X:4984->X.X.X.X:17621: read: connection reset by peer
--> BLIP+WebSocket connection error: read tcp X.X.X.X:4984->X.X.X.X:25376: read: connection timed out
--> BLIP+WebSocket connection error: read tcp X.X.X.X:4984->X.X.X.X:54763: read: connection timed out
and normally after those the app keeps going to load indefinitely, reaching sometimes the STOPPED
status.
Do you know why? How should i handle multiple connection?
Thank you in advance.