Returned unparseable data sometimes when requesting sync


#1

Hi,

I use cbl cordova plugin 1.1.1 in my hybrid ios app, and do data sync with couchbase server through sync gateway proxied by nginx. When requesting sync to mobile local cbl database, quite often the sync will be failed, strange errors printed on app console:

WARNING: CBLRemoteJSONRequest[GET http://<…>/sg/cugefit_workout_db/_local/829985057a996bb22f5f603ac8a51246af11e238]: GET http://<…>/sg/cugefit_workout_db/_local/829985057a996bb22f5f603ac8a51246af11e238 returned unparseable data

The data will be a 404 html page: with meta ‘content=“0;url=404.do”’

I tried several scenarios:

  • If I switched to another user account, the sync can be succeed, it means the problem might be related to cbl data.

  • If I directly use sync gateway address, the sync sometimes succeed, sometimes failed, that can exclude nginx proxy problem.

  • If I request sync just after compact the cbl local database, the sync can be succeed almost every time.

I have no clue how to find the real reason. What could be wrong?

Thanks!
Hanzhi


#2

There is no code in SG that returns HTML, so this must be some other component in the way.

I’ve never heard of a problem like this before, so I suspect this is something to do with the proxy.

If I directly use sync gateway address, the sync sometimes succeed, sometimes failed

Does it fail the same way?


#3

The 404 error is related to the proxy. Most of times the error is Timeout without proxy. I send a replicate request to local cbl database with 30seconds timeout, the response:

{“request”:{“id”:233,“xhr”:{“onabort”:null,“onloadend”:null,“onloadstart”:null,“onprogress”:null,“ontimeout”:null,“onreadystatechange”:null,“timeout”:0,“readyState”:0,“withCredentials”:false,“upload”:{“onabort”:null,“onerror”:null,“onload”:null,“onloadend”:null,“onloadstart”:null,“onprogress”:null},“responseText”:"",“responseXML”:null,“responseType”:"",“response”:"",“status”:0,“statusText”:"",“responseURL”:""},“headers”:{“Cookie”:“SyncGatewaySession=424c71d5c4df28795ac39fa61df8f0614818a98a”,“Content-Type”:“application/json”},“options”:{“url”:“http://lite.couchbase./_replicate”,“method”:“POST”,“xhr2”:true,“disableCaching”:false,“useDefaultXhrHeader”:false,“jsonData”:{“continuous”:false,“source”:{“headers”:{“Cookie”:“SyncGatewaySession=424c71d5c4df28795ac39fa61df8f0614818a98a”},“url”:“http://<…>/sg/cugefit_workout_db”},“target”:“workout_db”,“create_target”:false,“filter”:“sync_gateway/bychannel”,“query_params”:{“channels”:“u2”}},“headers”:{“Cookie”:“SyncGatewaySession=424c71d5c4df28795ac39fa61df8f0614818a98a”},“timeout”:30000},“async”:true,“timedout”:true},“requestId”:233,“status”:0,“statusText”:“communication failure”,“timedout”:true}

sometimes i can see a warning:
WARNING: CBL_Pusher[http://<…>/sg/cugefit_workout_db]: Unable to save remote checkpoint: Error Domain=CBLHTTP Code=409 “409 conflict” UserInfo={NSURL=http://<…>/sg/cugefit_workout_db/_local/7f485d338906ba89edabd2e86ba78c867523b18f, NSLocalizedFailureReason=conflict, NSLocalizedDescription=409 conflict}

Note: I replaced the ip address with <…>

From sync gateway logs, seems everything fine:

2015-12-17T10:20:37.522+08:00 Starting admin server on 127.0.0.1:4985
2015-12-17T10:20:37.528+08:00 Starting server on :4984 …
2015-12-17T10:20:37.710+08:00 Changes+: Notifying that “cugefit_workout_summary_dynamics_db” changed (keys="{_sync:user:2}") count=4
2015-12-17T10:21:06.884+08:00 Changes+: Notifying that “cugefit_workout_summary_db” changed (keys="{_sync:user:4}") count=7
2015-12-17T10:21:07.001+08:00 Changes+: Notifying that “cugefit_workout_summary_db” changed (keys="{_sync:user:11}") count=8
2015-12-17T10:21:33.072+08:00 Changes+: Notifying that “cugefit_workout_db” changed (keys="{_sync:user:2}") count=7
2015-12-17T10:21:38.237+08:00 Changes+: Notifying that “cugefit_workout_summary_db” changed (keys="{_sync:user:14}") count=9
2015-12-17T10:21:52.792+08:00 Changes+: Notifying that “cugefit_workout_summary_db” changed (keys="{_sync:user:2}") count=10
2015-12-17T10:36:46.585+08:00 HTTP: #001: GET /cugefit_workout_db/?_dc=1450319806302 (as 2)
2015-12-17T10:36:47.087+08:00 HTTP: #002: GET /cugefit_workout_db/_local/7f485d338906ba89edabd2e86ba78c867523b18f (as 2)
2015-12-17T10:36:48.052+08:00 HTTP: #003: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:36:48.166+08:00 HTTP: #004: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:36:48.181+08:00 HTTP: #005: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:36:48.185+08:00 HTTP: #006: POST /cugefit_workout_db/_revs_diff (as 2)
2015/12/17 10:36:48 go-couchbase: call to Do("-elDTVOILHO5Seg4XMpGJt2") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 200.680871ms
2015/12/17 10:36:48 go-couchbase: call to Do("-n8C4chLS2x9uExyG0ZIynM") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 358.822596ms
2015/12/17 10:36:48 go-couchbase: call to Do("-_wtOKjmIvmCUwjT30tZDpm") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 358.902354ms
2015/12/17 10:36:48 go-couchbase: call to Do("-pwcYkVg-cWl0CgoDW38vDV") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 369.509706ms
2015/12/17 10:36:48 go-couchbase: call to Do("-qGvSYYnRNYb-eQgUoyg5JR") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 381.591817ms
2015/12/17 10:36:49 go-couchbase: call to Do("-yoC1NPX-so35npZNM8NDzT") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 484.648105ms
2015/12/17 10:36:49 go-couchbase: call to Do("-qJ68nT3cBE9ANeV5vFLQJa") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 485.50106ms
2015/12/17 10:36:49 go-couchbase: call to Do("-TdUB78l7iseHyYwHHdAyrb") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 486.008006ms
2015/12/17 10:36:49 go-couchbase: call to Do("-swwOW6zLjWUomKdKA74WP-") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 443.863589ms
2015/12/17 10:36:50 go-couchbase: call to Do("-0-AZ5DiXq7BClFDw8k9heD") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 361.357096ms
2015/12/17 10:36:50 go-couchbase: call to Do("-lMiMTMjxdqJAqQ0X6XlU62") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 361.289682ms
2015/12/17 10:36:50 go-couchbase: call to Do("-WGm2qU5JkbMubSRzUlOJti") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 337.210082ms
2015/12/17 10:36:50 go-couchbase: call to Do("-2xwlAkr3-fRn357jt7j5Ct") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 316.473725ms
2015/12/17 10:36:51 go-couchbase: call to Do("-3RO2u9gFTqkEGTCkRRQquE") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 293.830955ms
2015/12/17 10:36:51 go-couchbase: call to Do("-i1rnZO37ASzoBqoCWsqkcp") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 300.387569ms
2015/12/17 10:36:51 go-couchbase: call to Do("-nQFRqAJJL_Sy5g_VgabCNM") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 279.242917ms
2015/12/17 10:36:51 go-couchbase: call to Do("-dak05d0pNTWcB20FKAK1j3") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 279.319691ms
2015-12-17T10:36:52.528+08:00 HTTP: #007: POST /cugefit_workout_db/_revs_diff (as 2)
2015/12/17 10:36:52 go-couchbase: call to Do("-hgsv6HPsYkI9dQ-TrSOK-p") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 322.081815ms
2015/12/17 10:36:52 go-couchbase: call to Do("-jJh3mNE9KjEjpyi4v8-Fcw") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 294.328306ms
2015/12/17 10:36:52 go-couchbase: call to Do("-rAY-0r3qSvZuRIMdNo56pn") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 268.344809ms
2015/12/17 10:36:53 go-couchbase: call to Do("-Ulowwk96hWMxdFDAOfqgj3") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 217.825417ms
2015-12-17T10:36:53.684+08:00 HTTP: #008: POST /cugefit_workout_db/_revs_diff (as 2)
2015/12/17 10:36:53 go-couchbase: call to Do("-5PCtkQZBB-HgMAyyESKnyN") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 300.889403ms
2015/12/17 10:36:54 go-couchbase: call to Do("-pjNMmIfNnsfW_J16kgdUQe") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 291.592583ms
2015/12/17 10:36:54 go-couchbase: call to Do("-GXJy3GUeo7ewumMCZz6tHx") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 290.755714ms
2015/12/17 10:36:55 go-couchbase: call to Do("-AlvvkjsBgp46Z4h_Wj7LJ5") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 273.296748ms
2015/12/17 10:36:55 go-couchbase: call to Do("-mkLE6cyGTha8ZanA86JFLA") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 274.084489ms
2015/12/17 10:36:56 go-couchbase: call to Do("-ek04ztYQDQTG3SGvhlPeTC") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 290.626823ms
2015/12/17 10:36:56 go-couchbase: call to Do("-vjaxvfWSV71_NezY3sHVxo") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 287.415204ms
2015-12-17T10:36:57.164+08:00 HTTP: #009: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:36:57.336+08:00 HTTP: #010: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:36:57.481+08:00 HTTP: #011: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:36:57.719+08:00 HTTP: #012: POST /cugefit_workout_db/_revs_diff (as 2)
2015/12/17 10:36:57 go-couchbase: call to Do("-JtujxoDvNdgwj1YAgpIGES") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 300.953557ms
2015/12/17 10:36:57 go-couchbase: call to Do("-1t33uDrMmmKpOKKfdrgRcw") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 297.908936ms
2015/12/17 10:36:57 go-couchbase: call to Do("-TAy_1ISMjeCyf9vR5CEtQT") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 285.16698ms
2015/12/17 10:36:58 go-couchbase: call to Do("-PlC2Nn82C3GG8O3tbBUcPX") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 262.990704ms
2015/12/17 10:36:58 go-couchbase: call to Do("-8Ls2L-9cXt6fOxpw61WGCX") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 266.654622ms
2015/12/17 10:36:58 go-couchbase: call to Do("-KRpIkP_TIk6wjfuSUmHanV") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 270.952056ms
2015/12/17 10:36:58 go-couchbase: call to Do("-ywOR8m6MnudmtQYTZowOX-") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 275.817989ms
2015/12/17 10:36:59 go-couchbase: call to Do("-wzdWzB-U3bv_hjkSAIT18u") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 228.460224ms
2015/12/17 10:36:59 go-couchbase: call to Do("-VX8sXyXPPLnYD08FWF0kAQ") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 228.722465ms
2015/12/17 10:36:59 go-couchbase: call to Do("-zefNhoaTlOPrgi3tuczJ0F") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 227.770199ms
2015/12/17 10:36:59 go-couchbase: call to Do("-3hGa7AiOjEDG1-qOUxHk2P") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 239.497643ms
2015/12/17 10:37:00 go-couchbase: call to Do("-IFB7X1u0Th2psjy0MgFPyR") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 263.952961ms
2015/12/17 10:37:00 go-couchbase: call to Do("-gSqThdIhRU_JBf-MajaZfV") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 266.871355ms
2015/12/17 10:37:00 go-couchbase: call to Do("-PsoXV6yVxBhzQefqwAPXfN") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 271.330662ms
2015/12/17 10:37:00 go-couchbase: call to Do("-1D8_nkUr2mQWf9S-AWKwKo") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 275.879194ms
2015-12-17T10:37:00.659+08:00 HTTP: #013: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:37:00.773+08:00 HTTP: #014: POST /cugefit_workout_db/_revs_diff (as 2)
2015/12/17 10:37:00 go-couchbase: call to Do("-XiVfEvhvqi4YNs6kH4rjLB") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 283.842918ms
2015/12/17 10:37:01 go-couchbase: call to Do("-dpDg7a7iy103UDuKQRbUNI") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 227.270747ms
2015/12/17 10:37:02 go-couchbase: call to Do("-H41Q5pzYSUpQnn2KiJClxo") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 293.213949ms
2015/12/17 10:37:02 go-couchbase: call to Do("-c006Tc61Wkpb4hf-AKizcZ") in github.com/couchbase/go-couchbase.(*Bucket).GetsRaw took 294.379619ms
2015-12-17T10:37:03.258+08:00 HTTP: #015: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:37:03.278+08:00 HTTP: #016: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:37:03.604+08:00 HTTP: #017: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:37:03.710+08:00 HTTP: #018: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:37:04.196+08:00 HTTP: #019: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:37:05.021+08:00 HTTP: #020: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:37:06.157+08:00 HTTP: #021: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:37:06.409+08:00 HTTP: #022: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:37:06.676+08:00 HTTP: #023: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:37:06.795+08:00 HTTP: #024: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:37:07.250+08:00 HTTP: #025: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:37:07.828+08:00 HTTP: #026: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:37:08.635+08:00 HTTP: #027: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:37:08.759+08:00 HTTP: #028: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:37:09.258+08:00 HTTP: #029: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:37:09.276+08:00 HTTP: #030: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:37:10.153+08:00 HTTP: #031: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:37:11.010+08:00 HTTP: #032: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:37:11.285+08:00 HTTP: #033: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:37:11.376+08:00 HTTP: #034: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:37:12.364+08:00 HTTP: #035: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:37:12.364+08:00 HTTP: #036: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:37:12.719+08:00 HTTP: #037: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:37:13.590+08:00 HTTP: #038: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:37:13.802+08:00 HTTP: #039: POST /cugefit_workout_db/_revs_diff (as 2)
2015-12-17T10:37:14.120+08:00 HTTP: #040: PUT /cugefit_workout_db/_local/7f485d338906ba89edabd2e86ba78c867523b18f (as 2)
2015-12-17T10:37:14.705+08:00 HTTP: #041: GET /cugefit_workout_db/-xudnfyT4ig-bFWEhOnK1qh?rev=7-4b370e45b6f1b1f2502c96ace2e092d1&revs=true&attachments=true (as 2)
2015-12-17T10:37:15.152+08:00 HTTP: #042: GET /cugefit_workout_db/-yL8rfcbeAZjV-zcB_9eBHZ?rev=7-893b9042bfba85ddba0f76b8c5a5a862&revs=true&attachments=true (as 2)
2015-12-17T10:37:15.382+08:00 HTTP: #043: GET /cugefit_workout_db/-PEoqevm_Uqvl1zgtk8GT1Y?rev=7-8db1e05cdda1e0f38af3481dee102580&revs=true&attachments=true (as 2)
2015-12-17T10:37:15.453+08:00 HTTP: #044: GET /cugefit_workout_db/-2dSdj-7dgaoHTpyEnHlhQf?rev=7-7edd8ae200a45807ef0d4315727f08cc&revs=true&attachments=true (as 2)
2015-12-17T10:37:15.493+08:00 HTTP: #045: GET /cugefit_workout_db/-IQHBejTj8l1-BY3J_mr4vR?rev=7-a5af343bd58f17110102cc568fe89b5f&revs=true&attachments=true (as 2)
2015-12-17T10:37:15.516+08:00 HTTP: #046: GET /cugefit_workout_db/-3M0M1w4bRGtuD6-SeZ-gFG?rev=7-a9889671853fe695c42bf6a10bbc55fa&revs=true&attachments=true (as 2)
2015-12-17T10:37:15.540+08:00 HTTP: #047: GET /cugefit_workout_db/-FHyu_rteIAvC2zcEMG5qds?rev=7-d648cb8f441bfeadc4f18feea26d12c6&revs=true&attachments=true (as 2)
2015-12-17T10:37:15.720+08:00 HTTP: #048: GET /cugefit_workout_db/-tDoItVwsS6Zm3ruCvGDkcj?rev=7-075a4f13484833fe72cbc6ec23b7aadd&revs=true&attachments=true (as 2)
2015-12-17T10:37:15.818+08:00 HTTP: #049: GET /cugefit_workout_db/-HrgbA9VnqPZwteaAMureHR?rev=7-03d49f6415570c3c8d9704ca67ca7c5e&revs=true&attachments=true (as 2)
2015-12-17T10:37:15.922+08:00 HTTP: #050: GET /cugefit_workout_db/-xsL2cHmwwEZaDkMxFjIBvJ?rev=7-922ddf2c0ac8fea782c172803ffd9c8c&revs=true&attachments=true (as 2)
2015-12-17T10:37:15.942+08:00 HTTP: #051: GET /cugefit_workout_db/-zk16yTEAHeRLtXnTi697zt?rev=7-6e10b8017a6d03dd5cb125e9e08fc224&revs=true&attachments=true (as 2)
2015-12-17T10:37:16.205+08:00 HTTP: #052: GET /cugefit_workout_db/-aekczrIjaGkQ5hVNnH9cbk?rev=7-d31327edaa30a6b7ff864c325c53388d&revs=true&attachments=true (as 2)
2015-12-17T10:37:16.212+08:00 HTTP: #053: GET /cugefit_workout_db/-32OsyMwIVD6rP9OP9UIP1b?rev=7-2953ddf468a6a89bec0f101b32aba2f4&revs=true&attachments=true (as 2)
2015-12-17T10:37:16.239+08:00 HTTP: #054: GET /cugefit_workout_db/-18veKLUw_XNY6G5yTp5GvF?rev=7-15f810f0559f1df72bd1f08b52aa33ec&revs=true&attachments=true (as 2)
2015-12-17T10:37:16.429+08:00 HTTP: #055: GET /cugefit_workout_db/-OBmn1bXdpBoXPk37Cu8etK?rev=7-2b985029551e7615dc5a97e8b3b17c2c&revs=true&attachments=true (as 2)
2015-12-17T10:37:16.437+08:00 HTTP: #056: GET /cugefit_workout_db/-N1PfZWc8tAESMiFG0IesvG?rev=7-a33ce4e284fa6d72f34396203a2b63fc&revs=true&attachments=true (as 2)
2015-12-17T10:37:16.438+08:00 HTTP: #057: GET /cugefit_workout_db/-k5kY1wP21gNZL-VVvtXMUv?rev=7-3115c5f83f1520b50ffc021a3fc6319d&revs=true&attachments=true (as 2)
2015-12-17T10:37:16.635+08:00 HTTP: #058: GET /cugefit_workout_db/-IUvvLmxQeG-7wxI3G3CMJs?rev=7-964e0f2c18f6d1aad1b1078df5b11935&revs=true&attachments=true (as 2)
2015-12-17T10:37:16.673+08:00 HTTP: #059: GET /cugefit_workout_db/-zG3TA-rHQN3SXkEbUlUAnb?rev=7-ea60426af44c46420304e3d5e8e061f7&revs=true&attachments=true (as 2)
2015-12-17T10:37:16.703+08:00 HTTP: #060: GET /cugefit_workout_db/-PbpAFkbXzBTtKBc74J4bzI?rev=7-71d70cda9cffa29643d4d3b0003a2b3d&revs=true&attachments=true (as 2)
2015-12-17T10:37:16.884+08:00 HTTP: #061: GET /cugefit_workout_db/–vrmBIA633aO2B6pT1Od4-?rev=7-652876f09c218f7796e4c02870e43db4&revs=true&attachments=true (as 2)
2015-12-17T10:37:16.892+08:00 HTTP: #062: GET /cugefit_workout_db/-qihKVCe7DXN7_aLmBZXlAF?rev=7-7c72c6fab9a7b094144e74da1354016d&revs=true&attachments=true (as 2)
2015-12-17T10:37:16.967+08:00 HTTP: #063: GET /cugefit_workout_db/-GzYfosSAdsdAClG6WReoox?rev=7-57e7ff4431fcf71fea9c161e29d91f03&revs=true&attachments=true (as 2)


#4

More findings might be related to the real reason for the problem:

  • When I request replicate with continuous as false, seems the response will wait the all docs sync are finished, if there are many docs need to be replicated, it will make the request timeout and no docs are replicated.

  • If request replicate with continuous as true, there might be still timeout in the first time replicate request, but after the first time, the sync will be succeed.

My question is:

  • for one shot replication, we have to give enough long timeout for the response, is this right behaviour?
  • for the continuous replication, at least for my testing, there is still timeout (I set 30 seconds) happened for the first time request replication, why we need wait so long?
  • any suggestions for using continuous replication or not?

Thanks!
Hanzhi