Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One shot sync not pulling data properly in background #1898

Closed
msanilkumar2020 opened this issue Sep 15, 2017 · 21 comments
Closed

One shot sync not pulling data properly in background #1898

msanilkumar2020 opened this issue Sep 15, 2017 · 21 comments

Comments

@msanilkumar2020
Copy link

msanilkumar2020 commented Sep 15, 2017

Hi,

We have have requirement where we need to download meta-document in background when we receive remote notification. Remote notification will give 30 seconds of execution time.

For this purpose we are using one shot sync, we are using Rest-based Api to start one shot sync.

Issue- Some time background one shot sync will work and some time it wont work.

Received Remote notification and stated one shot sync

[09/06 16:01:25:975][T  0x174861b80] Type-Router , Message-POST http://lite1.couchbase./_replicate + 179-byte body
	User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_2 like Mac OS X) AppleWebKit/603.2.4 (KHTML, like Gecko) Mobile/14F89
	Accept: application/json
	Content-Type: application/json
	Origin: file://

[09/06 16:01:25:976][T  0x174861b80] Type-Sync , Message-CBLRestPusher[https://919663390088:*****@syncqc7.companyName/ptxdata] STARTING ...
[09/06 16:01:25:980][T  0x174861b80] Type-Sync , Message-CBLRestPusher[https://919663390088:*****@syncqc7.companyName/ptxdata]: Going online
[09/06 16:01:25:981][T  0x174861b80] Type-Sync , Message-CBLRestPusher[https://919663390088:*****@syncqc7.companyName/ptxdata] Progress: set active = 1
[09/06 16:01:25:981][T  0x174861b80] Type-RemoteRequest , Message-Added Authorization header for CBLPasswordAuthorizer[919663390088/****]
[09/06 16:01:25:981][T  0x174861b80] Type-RemoteRequest , Message-CBLRemoteJSONRequest[GET https://919663390088:*****@syncqc7.companyName/ptxdata/_local/d1555b15aa64d3c98ddc56d07cb36396b633dd10]: Starting...

[09/06 16:01:26:006][T  0x1740763c0] Type-Sync , Message-CBLRestPuller[https://919663390088:*****@syncqc7.companyName/ptxdata]: **App backgrounding; Not extending background time**
[09/06 16:01:26:006][T  0x1740763c0] Type-Sync , Message-CBLRestPusher[https://919663390088:*****@syncqc7.companyName/ptxdata]: App backgrounding; Not extending background time

[09/06 16:01:26:108][T  0x174861b80] Type-Sync , Message-CBLRestPuller[https://919663390088:*****@syncqc7.companyName/ptxdata]: Server is Couchbase Sync Gateway/1.4.1

[09/06 16:01:26:108][T  0x174861b80] Type-RemoteRequest , Message-CBLRemoteJSONRequest[GET https://919663390088:*****@syncqc7.companyName/ptxdata/_local/1192c9371ea5f9e2172226c05d09b7e882b466be]: Got response, status 200

[09/06 16:01:26:108][T  0x17487bec0] Type-RemoteRequest , Message-CBLRemoteSession done with CBLRemoteJSONRequest[GET https://919663390088:*****@syncqc7.companyName/ptxdata/_local/1192c9371ea5f9e2172226c05d09b7e882b466be]
[09/06 16:01:26:109][T  0x174861b80] Type-RemoteRequest , Message-CBLRemoteJSONRequest[GET https://919663390088:*****@syncqc7.companyName/ptxdata/_local/1192c9371ea5f9e2172226c05d09b7e882b466be]: Finished loading

[09/06 16:01:26:109][T  0x174861b80] Type-Sync , Message-CBLRestPuller[https://919663390088:*****@syncqc7.companyName/ptxdata]: Replicating from lastSequence=8235804

[09/06 16:01:26:122][T  0x174861b80] Type-Sync , Message-CBLRestPusher[https://919663390088:*****@syncqc7.companyName/ptxdata]: Server is Couchbase Sync Gateway/1.4.1

[09/06 16:01:26:122][T  0x174861b80] Type-RemoteRequest , Message-CBLRemoteJSONRequest[GET https://919663390088:*****@syncqc7.companyName/ptxdata/_local/d1555b15aa64d3c98ddc56d07cb36396b633dd10]: Got response, status 200

[09/06 16:01:26:124][T  0x17487bec0] Type-RemoteRequest , Message-CBLRemoteSession done with CBLRemoteJSONRequest[GET https://919663390088:*****@syncqc7.companyName/ptxdata/_local/d1555b15aa64d3c98ddc56d07cb36396b633dd10]

[09/06 16:01:26:124][T  0x174861b80] Type-RemoteRequest , Message-CBLRemoteJSONRequest[GET https://919663390088:*****@syncqc7.companyName/ptxdata/_local/d1555b15aa64d3c98ddc56d07cb36396b633dd10]: Finished loading

[09/06 16:01:26:125][T  0x174861b80] Type-Sync , Message-CBLRestPusher[https://919663390088:*****@syncqc7.companyName/ptxdata]: Replicating from lastSequence=176

[09/06 16:01:26:126][T  0x174861b80] Type-Sync , Message-CBLRestPusher[https://919663390088:*****@syncqc7.companyName/ptxdata] Progress: set active = 0
[09/06 16:01:26:126][T  0x174861b80] Type-Sync , Message-CBLRestPusher[https://919663390088:*****@syncqc7.companyName/ptxdata] **STOPPED**
[09/06 16:01:26:126][T  0x174861b80] Type-(null) , Message-Replication: CBLRestPusher[https://919663390088:*****@syncqc7.companyName/ptxdata] took 0.147 sec; error=(null)
[09/06 16:01:26:126][T  0x174861b80] Type-Router , Message-Response -- status=200, body=34 bytes
	Content-Type: application/json

[09/06 16:01:26:127][T  0x170a7f500] Type-RemoteRequest , Message-CBLRemoteSession closing
[09/06 16:01:26:127][T  0x174861b80] Type-Sync , Message-CBLRestPusher[https://919663390088:*****@syncqc7.companyName/ptxdata] **STOPPED**
[09/06 16:01:26:127][T  0x174861b80] Type-(null) , Message-Replication: CBLRestPusher[https://919663390088:*****@syncqc7.companyName/ptxdata] took 0.148 sec; error=(null)
[09/06 16:01:26:127][T  0x174861b80] Type-Sync , Message-CBLRestPusher[https://919663390088:*****@syncqc7.companyName/ptxdata] **STOPPING**...
[09/06 16:01:26:128][T  0x170669300] Type-RemoteRequest , Message-CBLRemoteSession closed
[09/06 16:01:26:128][T  0x170669300] Type-RemoteRequest , Message-CBLRemoteSession closing
received response from syncgateway with changes 
[09/06 16:01:26:203][T  0x174861b80] Type-Sync , Message-CBLRestPuller[https://919663390088:*****@syncqc7.kodiakhandset.com/ptxdata]: **Caught up with changes!**

[09/06 16:01:26:206][T  0x174861b80] Type-Sync , Message-CBLRestPuller[https://919663390088:*****@syncqc7.companyName/ptxdata]: ChangeTracker stopped; error=(null)
[09/06 16:01:26:206][T  0x174861b80] Type-Sync , Message-CBLRestPuller[https://919663390088:*****@syncqc7.companyName/ptxdata] Progress: 2 / 2
[09/06 16:01:26:207][T  0x174861b80] Type-Sync , Message-CBLRestPuller[https://919663390088:*****@syncqc7.companyName/ptxdata] Progress: going inactive, after saving checkpoint...
[09/06 16:01:26:207][T  0x174861b80] Type-Sync , Message-CBLRestPuller[https://919663390088:*****@syncqc7.companyName/ptxdata] checkpointing sequence=**8235830**
[09/06 16:01:26:207][T  0x174861b80] Type-RemoteRequest , Message-Added Authorization header for CBLPasswordAuthorizer[919663390088/****]
[09/06 16:01:26:207][T  0x174861b80] Type-RemoteRequest , Message-CBLRemoteJSONRequest[PUT https://919663390088:*****@syncqc7.companyName/ptxdata/_local/1192c9371ea5f9e2172226c05d09b7e882b466be]: Starting...

[09/06 16:01:26:294][T  0x174861b80] Type-RemoteRequest , Message-CBLRemoteJSONRequest[PUT https://919663390088:*****@syncqc7.companyName/ptxdata/_local/1192c9371ea5f9e2172226c05d09b7e882b466be]: Got response, status 201


[09/06 16:01:26:299][T  0x174861b80] Type-Sync , Message-CBLRestPuller[https://919663390088:*****@syncqc7.companyName/ptxdata] saved remote checkpoint '8235830' (_rev=0-4)
[09/06 16:01:26:299][T  0x174861b80] Type-Sync , Message-CBLRestPuller[https://919663390088:*****@syncqc7.companyName/ptxdata] Progress: set active = 0
[09/06 16:01:26:300][T  0x174861b80] Type-Sync , Message-CBLRestPuller[https://919663390088:*****@syncqc7.companyName/ptxdata] STOPPED
[09/06 16:01:26:300][T  0x174861b80] Type-(null) , Message-Replication: CBLRestPuller[https://919663390088:*****@syncqc7.companyName/ptxdata] took 0.346 sec; error=(null)
[09/06 16:01:26:300][T  0x174861b80] Type-Router , Message-Response -- status=200, body=34 bytes
	Content-Type: application/json

I am not able to get why puller stopped without pulling the changes received from change tracker. Do we have any restriction in background fetching data


  • Version: 1.4.1
  • Client OS: iOS 10.3.2
  • Server: NAME_AND_VERSION
@snej
Copy link
Contributor

snej commented Sep 15, 2017

The key is the message App backgrounding; Not extending background time. I think what's happening is that the replicator sees that the app is backgrounded, and it doesn't have any active tasks (yet), so it decides it doesn't need background time and just stops immediately.

I can't remember what we've done to support replications that start in the background; @pasin?

@pasin
Copy link
Contributor

pasin commented Sep 15, 2017

We always suggested users to reset the suspened flag but that does't work for a single short replicator. Another thing is that I don't think it's possible to reset the suspened flag from the rest API. I was thinking that we should have an option that allows the replicator to run in the background but the app needs to manage the background task by itself (this is what I'm implementing for 2.0). We could do this for 1.4.1 as well.

@pasin
Copy link
Contributor

pasin commented Sep 15, 2017

But I think we should allow the replicator to start and run in background til idle before suspeneding it. So this is a bug.

@msanilkumar2020
Copy link
Author

@pasin ,do we have any quick workaround for this issue?

Is there a way we can detect one shot sync stopped and start full sync?

Note : We cannot run full sync always in background, this will result in CPU usage crash. We want to start Full sync conditionally in background.

@pasin
Copy link
Contributor

pasin commented Sep 20, 2017

There is no workarounds. I reviewed the code today, and it seems like there is a race between setting an internal active flag and checking the flag when detecting that the app is in the background.

Basically this line is called from the main thread, but the active flag is set on the replicator thread. I'm working on the fix.

@pasin
Copy link
Contributor

pasin commented Sep 20, 2017

Is there a way we can detect one shot sync stopped and start full sync?

Not sure I understand your question, basically one short replicator will run until caught up unless there is an error occurred. To know the status, you can subscribe for CBLReplicatorChangeNotification or keep checking replicator's status property.

@pasin pasin self-assigned this Sep 20, 2017
@pasin pasin added this to the 1.4.1 milestone Sep 20, 2017
pasin added a commit that referenced this issue Sep 20, 2017
* Currently some variables (_active, _filesystemUnavailable, and _deepBackground) could be accessed from different threads (main thread and replicator thread). Fixing this by always executes background/forground handling codes on the replicator thread.

* This is also fixed the issue that the replicator (especially pull replicator) is suspended immediately when starting it in the background. Basically there is a race when accessing the _active variable (#1898)
@pasin
Copy link
Contributor

pasin commented Sep 20, 2017

@msanilkumar2020 I made the fix in feature/fix_repl_bg branch. Would you mind to try it out?

@msanilkumar2020
Copy link
Author

Sure @pasin , will test our app with this changes.

pasin added a commit that referenced this issue Sep 22, 2017
* Currently some variables (_active, _filesystemUnavailable, and _deepBackground) could be accessed from different threads (main thread and replicator thread). Fixing this by always executes background/forground handling codes on the replicator thread.

* This is also fixed the issue that the replicator (especially pull replicator) is suspended immediately when starting it in the background. Basically there is a race when accessing the _active variable (#1898)
@pasin
Copy link
Contributor

pasin commented Sep 22, 2017

The PR has been merged the master branch. I'm closing the ticket now. Please reopen if you still see the issue.

@pasin pasin closed this as completed Sep 22, 2017
@snej snej changed the title One shot sync not pulling data properly in backgorund One shot sync not pulling data properly in background Sep 27, 2017
@msanilkumar2020
Copy link
Author

After merging this changes we are getting lot of Badf00d crashes, main thread is hanged more than 10 seconds.

Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace SPRINGBOARD, Code 0x8badf00d
Triggered by Thread: 0
Filtered syslog:
None found
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x1c5f9808 __psynch_cvwait + 24
1 libsystem_pthread.dylib 0x1c6afc42 _pthread_cond_wait + 560
2 libsystem_pthread.dylib 0x1c6b0fc4 pthread_cond_wait + 38
3 Foundation 0x1d6d7520 -[NSCondition wait] + 194
4 Foundation 0x1d69f42e -[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] + 762
5 Push To Talk Plus 0x00687592 MYOnThreadInModes (MYBlockUtils.m:78)
6 Push To Talk Plus 0x00646d3c -[CBLDatabase doSync:] (CBLDatabase.m:162)
7 Push To Talk Plus 0x0068c45c -[CBLRestReplicator(Backgrounding) appForegrounding] (CBLRestReplicator+Backgrounding.m:101)
8 Push To Talk Plus 0x0068c048 __54-[CBLRestReplicator(Backgrounding) setupBackgrounding]_block_invoke.18 (CBLRestReplicator+Backgrounding.m:48)
9 Push To Talk Plus 0x0061b3e2 -[MYBackgroundMonitor appForegrounding:] (MYBackgroundMonitor.m:107)
10 CoreFoundation 0x1cdd7db8 CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER + 10
11 CoreFoundation 0x1cdd76f8 _CFXRegistrationPost + 382
12 CoreFoundation 0x1cdd74e0 ___CFXNotificationPost_block_invoke + 40
13 CoreFoundation 0x1ce32308 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1242
14 CoreFoundation 0x1cd3b0f4 _CFXNotificationPost + 540
15 Foundation 0x1d6880ac -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
16 UIKit 0x222b0aa4 -[UIApplication _sendWillEnterForegroundCallbacks] + 240
17 UIKit 0x222e9310 -[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:] + 1766
18 UIKit 0x222e8ada __88-[UIApplication _handleApplicationLifecycleEventWithScene:transitionContext:completion:]_block_invoke + 92
19 UIKit 0x222e8a40 -[UIApplication _handleApplicationLifecycleEventWithScene:transitionContext:completion:] + 420
20 UIKit 0x222d6008 __70-[UIApplication scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 134
21 UIKit 0x222d5cf2 -[UIApplication scene:didUpdateWithDiff:transitionContext:completion:] + 824
22 UIKit 0x225db732 -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 412
23 FrontBoardServices 0x1e6e1f66 __80-[FBSSceneImpl updater:didUpdateSettings:withDiff:transitionContext:completion:]_block_invoke.376 + 210
24 FrontBoardServices 0x1e70cc12 FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 18
25 FrontBoardServices 0x1e70cacc -[FBSSerialQueue _performNext] + 220
26 FrontBoardServices 0x1e70cdb6 -[FBSSerialQueue _performNextFromRunLoopSource] + 44
27 CoreFoundation 0x1cde7fdc CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 12
28 CoreFoundation 0x1cde7b04 __CFRunLoopDoSources0 + 424
29 CoreFoundation 0x1cde5f50 __CFRunLoopRun + 1160
30 CoreFoundation 0x1cd391ae CFRunLoopRunSpecific + 470
31 CoreFoundation 0x1cd38fd0 CFRunLoopRunInMode + 104
32 GraphicsServices 0x1e4e3b40 GSEventRunModal + 80
33 UIKit 0x220c4a52 UIApplicationMain + 150
34 Push To Talk Plus 0x000480ba main (main.m:32)
35 libdyld.dylib 0x1c5264ea start + 2

@pasin
Copy link
Contributor

pasin commented Dec 1, 2017

The replicator's resuming is blocked for some reason when the app is on foregrounding. Can you provide the backtrace of all threads?

@msanilkumar2020
Copy link
Author

Uploading crash file, this issue is reproduced frequently after merging this changes.

Background.crash.zip

@snej
Copy link
Contributor

snej commented Dec 4, 2017

In the crash log, the background CBL thread is running a view query initiated by a REST call. It's not stuck, just in the middle of file I/O initiated by SQLite. The main thread is waiting on that, and it's apparently taking long enough that the OS decides the app is hung and kills the process.

The question is why there are REST calls happening while the app is in the background. The replicator is running, but there's obviously no UI to refresh. I'm assuming this is a PhoneGap app? It should probably ignore database changes while it's in the background. This will keep the CBL thread responsive.

@snej snej reopened this Dec 4, 2017
@djpongh djpongh modified the milestones: 1.4.1, 1.4.2, 1.4.x Dec 6, 2017
@msanilkumar2020
Copy link
Author

@snej ,
Yes our's is phonegap based app and we are starting replication when ever we receive push notification in background to utilize background wakeup time.

@djpongh djpongh added the icebox label Dec 15, 2017
pasin added a commit that referenced this issue Dec 22, 2017
* Reverted the fix back to 1.4.0 that executes background / foregrounding logic on the main thread instead of on the replicator thread which could block the main thread.

* Make CBLRestReplicator’s _active an atomic property.

* In `-backgroundTaskExpired` set `_deepBackground = YES` on the main thread instead of on the replicator thread as it has been done in 1.4.0.
pasin added a commit that referenced this issue Dec 22, 2017
* Reverted the fix back to 1.4.0 that executes background / foregrounding logic on the main thread instead of on the replicator thread which could block the main thread.

* Make CBLRestReplicator’s _active an atomic property.

* In `-backgroundTaskExpired` set `_deepBackground = YES` on the main thread instead of on the replicator thread as it was in 1.4.0.

#1898
pasin added a commit that referenced this issue Dec 22, 2017
* Reverted the fix back to 1.4.0 that executes background / foregrounding logic on the main thread instead of on the replicator thread which could block the main thread.

* Make CBLRestReplicator’s _active an atomic property.

* In `-backgroundTaskExpired` set `_deepBackground = YES` on the main thread instead of on the replicator thread as it was in 1.4.0.

#1898
pasin added a commit that referenced this issue Dec 22, 2017
* Reverted the fix back to 1.4.0 that executes background / foregrounding logic on the main thread.

* In CBLRestReplicator.m, make CBLRestReplicator’s `_active` property atomic.

* In CBLRestReplicator.m, moved calling `[self setupBackgrounding]` to the end of the `-start` method.

* In `-backgroundTaskExpired` of CBLRestReplicator+Backgrounding.m, set `_deepBackground = YES` on the main thread instead of on the replicator thread as it was in 1.4.0.

#1898
@pasin pasin added review and removed icebox labels Dec 22, 2017
@djpongh djpongh modified the milestones: 1.4.x, 1.4.2 Jan 22, 2018
@msanilkumar2020
Copy link
Author

After merging this change, we are not getting crash but replication is stopping immediately after entering background. We are not able to utilize 180 seconds of background time. We need to pull the documents in background after receiving Push notification. After this changes that is failing.

For all restapi call, we are getting response as offline even sync is not starting.

[01/31 18:12:52:707][ 0x1c08718c0]Type-Sync , Message-CBLRestPuller[https://919800010101:@sync.xxxxxxxxxx.com/ptxdata]: SUSPENDING
[01/31 18:12:52:707][ 0x1c08718c0]Type-Sync , Message-CBLRestPuller[https://919800010101:
@sync.xxxxxxxxxx.com/ptxdata]: Reachability state = <sync.xxxxxxxxxx.com>:reachable (02), suspended=1
[01/31 18:12:52:707][ 0x1c08718c0]Type-Sync , Message-CBLRestPuller[https://919800010101:@sync.xxxxxxxxxx.com/ptxdata]: Going offline
[01/31 18:12:52:707][ 0x1c08718c0]Type-RemoteRequest , Message-Stopping 1 remote requests
[01/31 18:12:52:707][ 0x1c08718c0]Type-RemoteRequest , Message-CBLRemoteJSONRequest[GET https://919800010101:
@sync.xxxxxxxxxx.com/ptxdata/_local/5eff24eab9ee3f8be853e416475772b39f4d9eac]: Stopped
[01/31 18:12:52:707][ 0x1c08718c0]Type-Sync , Message-CBLRestPuller[https://919800010101:@sync.xxxxxxxxxx.com/ptxdata] Progress: set active = 0
[01/31 18:12:52:708][ 0x1c407b480]Type-Sync , Message-CBLRestPusher[https://919800010101:
@sync.xxxxxxxxxx.com/ptxdata]: App backgrounding, but can't run background task; suspending
[01/31 18:12:52:708][ 0x1c08718c0]Type-Sync , Message-CBLRestPusher[https://919800010101:@sync.xxxxxxxxxx.com/ptxdata]: SUSPENDING
[01/31 18:12:52:708][ 0x1c08718c0]Type-Sync , Message-CBLRestPusher[https://919800010101:
@sync.xxxxxxxxxx.com/ptxdata]: Reachability state = <sync.xxxxxxxxxx.com>:reachable (02), suspended=1
[01/31 18:12:52:708][ 0x1c08718c0]Type-Sync , Message-CBLRestPusher[https://919800010101:@sync.xxxxxxxxxx.com/ptxdata]: Going offline
[01/31 18:12:52:708][ 0x1c08718c0]Type-RemoteRequest , Message-Stopping 1 remote requests
[01/31 18:12:52:708][ 0x1c08718c0]Type-RemoteRequest , Message-CBLRemoteJSONRequest[GET https://919800010101:
@sync.xxxxxxxxxx.com/ptxdata/_local/7cdb768c5d4393d16e87f912d28a5e36fcb4e06f]: Stopped
[01/31 18:12:52:708][ 0x1c08718c0]Type-Sync , Message-CBLRestPusher[https://919800010101:*****@sync.xxxxxxxxxx.com/ptxdata] Progress: set active = 0
[01/31 18:12:52:711][ 0x1c4a7a480]Type-RemoteRequest , Message-CBLRemoteSession starting CBLRemoteJSONRequest[(null) (null)]
[01/31 18:12:52:712][ 0x1c087d700]Type-RemoteRequest , Message-CBLRemoteSession done with CBLRemoteJSONRequest[(null) (null)]
[01/31 18:12:52:712][ 0x1c087d700]Type-RemoteRequest , Message-CBLRemoteSession done with CBLRemoteJSONRequest[(null) (null)]
[01/31 18:12:52:722][ 0x1c08718c0]Type-Router , Message-GET http://lite.couchbase./_active_tasks

User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_2_5 like Mac OS X) AppleWebKit/604.5.6 (KHTML, like Gecko) Mobile/15D60
Accept: application/json
Content-Type: application/json

[01/31 18:12:52:722][ 0x1c08718c0]Type-Router , Message-Response -- status=200, body=399 bytes
Server: 1.4.1
Accept-Ranges: bytes
Cache-Control: must-revalidate
Content-Type: application/json
[01/31 18:12:53:760][ 0x1c08718c0]Type-Router , Message-GET http://lite.couchbase./_active_tasks
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_2_5 like Mac OS X) AppleWebKit/604.5.6 (KHTML, like Gecko) Mobile/15D60
Accept: application/json
Content-Type: application/json
[01/31 18:12:53:761][ 0x1c08718c0]Type-Router , Message-Response -- status=200, body=399 bytes
Server: 1.4.1
Accept-Ranges: bytes
Cache-Control: must-revalidate
Content-Type: application/json
[01/31 18:12:54:780][ 0x1c08718c0]Type-Router , Message-GET http://lite.couchbase./_active_tasks
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_2_5 like Mac OS X) AppleWebKit/604.5.6 (KHTML, like Gecko) Mobile/15D60
Accept: application/json
Content-Type: application/json
[01/31 18:12:54:781][ 0x1c08718c0]Type-Router , Message-Response -- status=200, body=399 bytes
Server: 1.4.1
Accept-Ranges: bytes
Cache-Control: must-revalidate
Content-Type: application/json
[01/31 18:12:55:803][ 0x1c08718c0]Type-Router , Message-GET http://lite.couchbase./_active_tasks
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_2_5 like Mac OS X) AppleWebKit/604.5.6 (KHTML, like Gecko) Mobile/15D60
Accept: application/json
Content-Type: application/json
[01/31 18:12:55:804][ 0x1c08718c0]Type-Router , Message-Response -- status=200, body=399 bytes
Server: 1.4.1
Accept-Ranges: bytes
Cache-Control: must-revalidate
Content-Type: application/json
[01/31 18:12:56:819][ 0x1c08718c0]Type-Router , Message-GET http://lite.couchbase./_active_tasks
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_2_5 like Mac OS X) AppleWebKit/604.5.6 (KHTML, like Gecko) Mobile/15D60
Accept: application/json
Content-Type: application/json
[01/31 18:12:56:819][ 0x1c08718c0]Type-Router , Message-Response -- status=200, body=399 bytes
Server: 1.4.1
Accept-Ranges: bytes
Cache-Control: must-revalidate
Content-Type: application/json
[01/31 18:12:57:839][ 0x1c08718c0]Type-Router , Message-GET http://lite.couchbase./_active_tasks
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_2_5 like Mac OS X) AppleWebKit/604.5.6 (KHTML, like Gecko) Mobile/15D60
Accept: application/json
Content-Type: application/json
[01/31 18:12:57:841][ 0x1c08718c0]Type-Router , Message-Response -- status=200, body=399 bytes
Server: 1.4.1
Accept-Ranges: bytes
Cache-Control: must-revalidate
Content-Type: application/json
[01/31 18:12:58:856][ 0x1c08718c0]Type-Router , Message-GET http://lite.couchbase./_active_tasks
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_2_5 like Mac OS X) AppleWebKit/604.5.6 (KHTML, like Gecko) Mobile/15D60
Accept: application/json
Content-Type: application/json
[01/31 18:12:58:857][ 0x1c08718c0]Type-Router , Message-Response -- status=200, body=399 bytes
Server: 1.4.1
Accept-Ranges: bytes
Cache-Control: must-revalidate
Content-Type: application/json
[01/31 18:12:59:867][ 0x1c08718c0]Type-Router , Message-GET http://lite.couchbase./_active_tasks
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_2_5 like Mac OS X) AppleWebKit/604.5.6 (KHTML, like Gecko) Mobile/15D60
Accept: application/json
Content-Type: application/json
[01/31 18:12:59:867][ 0x1c08718c0]Type-Router , Message-Response -- status=200, body=399 bytes
Server: 1.4.1
Accept-Ranges: bytes
Cache-Control: must-revalidate
Content-Type: application/json
[01/31 18:13:00:882][ 0x1c08718c0]Type-Router , Message-GET http://lite.couchbase./_active_tasks
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_2_5 like Mac OS X) AppleWebKit/604.5.6 (KHTML, like Gecko) Mobile/15D60
Accept: application/json
Content-Type: application/json
[01/31 18:13:00:885][ 0x1c08718c0]Type-Router , Message-Response -- status=200, body=399 bytes
Server: 1.4.1
Accept-Ranges: bytes
Cache-Control: must-revalidate
Content-Type: application/json
[01/31 18:13:01:908][ 0x1c08718c0]Type-Router , Message-GET http://lite.couchbase./_active_tasks
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_2_5 like Mac OS X) AppleWebKit/604.5.6 (KHTML, like Gecko) Mobile/15D60
Accept: application/json
Content-Type: application/json
[01/31 18:13:01:909][ 0x1c08718c0]Type-Router , Message-Response -- status=200, body=399 bytes
Server: 1.4.1
Accept-Ranges: bytes
Cache-Control: must-revalidate
Content-Type: application/json
[01/31 18:13:02:926][ 0x1c08718c0]Type-Router , Message-GET http://lite.couchbase./_active_tasks
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_2_5 like Mac OS X) AppleWebKit/604.5.6 (KHTML, like Gecko) Mobile/15D60
Accept: application/json
Content-Type: application/json
[01/31 18:13:02:927][ 0x1c08718c0]Type-Router , Message-Response -- status=200, body=399 bytes
Server: 1.4.1
Accept-Ranges: bytes
Cache-Control: must-revalidate
Content-Type: application/json

@pasin pasin closed this as completed in cab4536 Feb 6, 2018
@pasin pasin removed the review label Feb 6, 2018
@msanilkumar2020
Copy link
Author

@pasin / @snej
After merging this changes, sync is not working in Background. Replicator become offline and will become online only after entering foreground. Please check this issue.

@pasin
Copy link
Contributor

pasin commented Feb 26, 2018

I will test this.

@pasin pasin reopened this Feb 26, 2018
@msanilkumar2020
Copy link
Author

@pasin ,
Do you have any update on this issue?

@pasin
Copy link
Contributor

pasin commented May 16, 2018

Sorry, I don't have update on this. I still don't have a chance to look at the issue.

@pasin
Copy link
Contributor

pasin commented Jun 6, 2018

@msanilkumar2020 I have tested the fix and I have not observed the same issue anymore. Could you please share the log after picking up the fix? Also please use single shot replicator as there is no REST API to reset the suspend flag of the continuous replicator.

@djpongh djpongh modified the milestones: 1.4.2, 1.4.4 Jul 2, 2018
@djpongh
Copy link

djpongh commented Jul 26, 2018

Assuming works since we haven't heard anything.

@djpongh djpongh closed this as completed Jul 26, 2018
@pasin pasin removed the backlog label Jul 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants