karma-browserstack-launcher icon indicating copy to clipboard operation
karma-browserstack-launcher copied to clipboard

Use higher default pollingTimeout than 1 second

Open jzaefferer opened this issue 9 years ago • 7 comments

BrowserStack implemented rate limiting for their API, currently 120 requests/min. The 1s pollingTimeout, combined with other requests, makes it likely to quickly hit that limit.

browserstack-runner has a default polling interval of 2 seconds.

jzaefferer avatar Jul 24 '15 14:07 jzaefferer

A better solution would be to use a global pool queue instead of separate ones for each browser - current solution will always hit the limit if the number of browsers is high enough.

mgol avatar Jul 27 '15 14:07 mgol

+1 to finding a way around the limit

forbesjo avatar Sep 01 '15 14:09 forbesjo

+1

gdubicki avatar Sep 06 '15 20:09 gdubicki

+1 - I've been talking with BrowserStack about this but I haven't gotten very far.

I get this when I run 70 tests in 2 browsers even with pollingTimeout set to 10 seconds, (as recommended by BrowserStack.)

Their rate limit seems a bit severe.

::end rant::

Looks like you can get all workers in a single API call, (GET /workers) to implement the pool option that @mzgol mentioned.

coryvirok avatar Sep 21 '15 21:09 coryvirok

@johnjbarton maybe you could change the default timeout to 10000 in this package and release a new version?

XhmikosR avatar Apr 09 '20 19:04 XhmikosR

Did you try the suggestion in #159?

johnjbarton avatar Apr 09 '20 19:04 johnjbarton

If you mean the suggestion in https://github.com/karma-runner/karma-browserstack-launcher/issues/159#issuecomment-582837942, I haven't tried that yet. I can try it but it's hard to reproduce unless I push many PRs at the same time.

So, just so that we are on the same page, the suggestion is to use this?

captureTimeout: 30000,
browserDisconnectTimeout: 30000,
browserDisconnectTolerance: 3
browserNoActivityTimeout: 30000,
browserSocketTimeout: 12000,

Someone else should try this values too. From https://github.com/karma-runner/karma-browserstack-launcher/issues/61#issue-129246470 I see mentioning only these values:

captureTimeout: 30000,
browserDisconnectTimeout: 30000,
browserDisconnectTolerance: 3
browserNoActivityTimeout: 30000,

XhmikosR avatar Apr 10 '20 07:04 XhmikosR