Re: Cloudant 10 requests per second limit

2017-12-08 Thread Brendan Duddridge
Hi Traun,

Looks like this is the code in question:
>
>
> https://github.com/couchbase/couchbase-lite-ios/blob/9a8903b9e851d5584abeec069ead4d2637b3bb91/Source/CBLMisc.m#L381
>

Ah excellent! I've added a check for the 429 error to tell it to return NO 
that's it's not a fatal error.

Now I just have to figure out the attachment size issue and then I'll be 
all set!

Thanks!

Brendan 

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/5af1af15-66d3-442d-bd01-5b662d2992c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Cloudant 10 requests per second limit

2017-12-08 Thread Traun Leyden
Looks like this is the code in question:

https://github.com/couchbase/couchbase-lite-ios/blob/9a8903b9e851d5584abeec069ead4d2637b3bb91/Source/CBLMisc.m#L381



On Fri, Dec 8, 2017 at 11:40 AM, Brendan Duddridge 
wrote:

> Hi Jens,
>
>
> Sync Gateway will sometimes return a 503 if the DB server is overloaded;
>> CBL handles that by trying again a bit later. What status code does
>> Cloudant return?
>>
>
> Where in CBL does it handle the 503 error and try again? Do you think I
> could just modify the code to also do the same thing with a 429 error?
>
> Thanks,
>
> Brendan
>
> --
> You received this message because you are subscribed to the Google Groups
> "Couchbase Mobile" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mobile-couchbase+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/mobile-couchbase/254b7f83-ef95-4ec3-8aab-
> 7b6461470d61%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/CACSSHCGdwWzqgdxdZ4dkSOt7mhTpNC-8w7jZQCwLQ6Yr%3DYtbPw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Cloudant 10 requests per second limit

2017-12-08 Thread Brendan Duddridge
Hi Jens,


Sync Gateway will sometimes return a 503 if the DB server is overloaded; 
> CBL handles that by trying again a bit later. What status code does 
> Cloudant return?
>

Where in CBL does it handle the 503 error and try again? Do you think I 
could just modify the code to also do the same thing with a 429 error?

Thanks,

Brendan 

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/254b7f83-ef95-4ec3-8aab-7b6461470d61%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Cloudant 10 requests per second limit

2017-12-05 Thread Brendan Duddridge


> Sync Gateway will sometimes return a 503 if the DB server is overloaded; 
> CBL handles that by trying again a bit later. What status code does 
> Cloudant return?
>
>
It looks like it's a 429 -- too many requests error. 

https://console.bluemix.net/docs/services/Cloudant/api/http.html#http

and from the RFC standard:

https://tools.ietf.org/html/rfc6585#page-3


-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/41ca1e5c-ff07-4992-b344-1f920b4abec1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Cloudant 10 requests per second limit

2017-12-05 Thread Jens Alfke


> On Dec 5, 2017, at 3:14 PM, Brendan Duddridge  wrote:
> 
> Ya, I didn't think it ran any queries. But it would be good if it could 
> handle the response code and then try again in a little bit.


Sync Gateway will sometimes return a 503 if the DB server is overloaded; CBL 
handles that by trying again a bit later. What status code does Cloudant return?

—Jens

Jens Alfke — Mobile Architect — Couchbase, Inc.

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/0BB13DE2-9DB8-469B-9431-ADFAB7B56388%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.


Re: Cloudant 10 requests per second limit

2017-12-05 Thread Brendan Duddridge
Ya, I didn't think it ran any queries. But it would be good if it could 
handle the response code and then try again in a little bit.

On Tuesday, December 5, 2017 at 3:48:17 PM UTC-7, Jens Alfke wrote:
>
>
> No, there’s nothing like that, because it’s never been an issue before. 
> (FWIW, the replicator does not run any view queries.) 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/309f5ee7-e329-4446-b3ad-ecb8d11b2fbe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Cloudant 10 requests per second limit

2017-12-05 Thread Jens Alfke


> On Dec 5, 2017, at 12:55 PM, Brendan Duddridge  wrote:
> 
> I was wondering if there was anything in Couchbase Lite 1.4 which could 
> throttle the number of lookups per second, writes per second and queries per 
> second during a replication process.

No, there’s nothing like that, because it’s never been an issue before.
(FWIW, the replicator does not run any view queries.)

—Jens

Jens Alfke — Mobile Architect — Couchbase, Inc.

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/F98D1EF0-9550-4B04-A934-093ADC586262%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.


Re: Cloudant 10 requests per second limit

2017-12-05 Thread Brendan Duddridge
Yes, that is a limitation with the free tier. But their older Cloudant 
service didn't have this limitation and I had a lot of customers using it. 
So now I'm starting to field all these support requests. Just trying to 
figure out what to do now and how to handle it.

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/11d4c762-88d0-4a1c-bbbc-5d22eada9722%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Cloudant 10 requests per second limit

2017-12-05 Thread Traun Leyden
I think those limitations only apply to the free tier of IBM Cloud.

I don't know of any throttling mechanisms in Couchbase Lite along those
lines though.

On Tue, Dec 5, 2017 at 12:55 PM, Brendan Duddridge 
wrote:

> Hi,
>
> IBM has changed their system so that it only allows for a limited number
> of requests per second:
>
>
>- 20 Lookups/sec
>- 10 Writes/sec
>- 5 Queries/sec
>
>
> I was wondering if there was anything in Couchbase Lite 1.4 which could
> throttle the number of lookups per second, writes per second and queries
> per second during a replication process.
>
> Or if the too many requests response occurred, that Couchbase Lite could
> back off and try again a second or two later.
>
> IBM is apparently doing everything they can to make things difficult.
> First the attachments issue, now this. I'm getting a lot of support
> requests from my customers about these issues.
>
> Thanks,
>
> Brendan
>
> --
> You received this message because you are subscribed to the Google Groups
> "Couchbase Mobile" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mobile-couchbase+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/mobile-couchbase/f4f020d3-131a-4aee-b3b5-
> e06d822c5eee%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/CACSSHCFSHa6eQqiX6z7XQJU-xT8Gmh1MCe6SviSMXtEnNnq8oQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Cloudant 10 requests per second limit

2017-12-05 Thread Brendan Duddridge
Hi,

IBM has changed their system so that it only allows for a limited number of 
requests per second:


   - 20 Lookups/sec
   - 10 Writes/sec
   - 5 Queries/sec


I was wondering if there was anything in Couchbase Lite 1.4 which could 
throttle the number of lookups per second, writes per second and queries 
per second during a replication process.

Or if the too many requests response occurred, that Couchbase Lite could 
back off and try again a second or two later.

IBM is apparently doing everything they can to make things difficult. First 
the attachments issue, now this. I'm getting a lot of support requests from 
my customers about these issues.

Thanks,

Brendan

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/f4f020d3-131a-4aee-b3b5-e06d822c5eee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.