browsertime icon indicating copy to clipboard operation
browsertime copied to clipboard

Concurrency issue

Open scorpiock opened this issue 4 years ago • 4 comments

Thank you for the brilliant tool.

I am having an issue and hope you can help. When I run (docker version) once it works. However, when running multiple tests simultaneously, it fails.

It gives the following error.

`[2019-11-21 21:10:30] INFO: Running tests using Chrome - 1 iteration(s)

[2019-11-21 21:10:33] INFO: Testing url https://example.com iteration 1 [2019-11-21 21:10:49] ERROR: Could not load URLTimeoutError: timeout (Session info: chrome=78.0.3904.87) [2019-11-21 21:10:49] ERROR: UrlLoadError: Failed to load https://example.com at SeleniumRunner.loadAndWait (/usr/src/app/lib/core/seleniumRunner.js:232:13) at processTicksAndRejections (internal/process/task_queues.js:93:5) [2019-11-21 21:10:50] INFO: https://example.com`

Is there any known issue or flag I should be used to test multiple URLs, concurrently?

scorpiock avatar Nov 21 '19 21:11 scorpiock

Hi @scorpiock it should work, but it could be colliding ports etc. How do you run it so I can reproduce? Do you use Docker or just NodeJS?

Best Peter

soulgalore avatar Nov 22 '19 15:11 soulgalore

Hello Peter,

Using PHP to call Docker and running the following commands.

docker run --rm -v '/usr/local/prj/sto/temp':/browsertime sitespeedio/browsertime --screenshot --video --visualMetrics --useSameDir --iterations=1 --timeouts.pageLoad=15000 --viewPort=1366x768 --screenshotParams.type=png --screenshotParams.maxSize=1366 --videoParams.createFilmstrip=false --browser=chrome --userAgent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36" --resultDir=odvo72askci 'https://geekflare.com' 2>&1

To reproduce the issue:

  1. Open three CentOS server sessions
  2. Execute above command (change the URL)on all the terminal simultaneously. You will notice only run is success and remaining two will fail.

On Fri, 22 Nov 2019, 15:33 Peter Hedenskog, [email protected] wrote:

Hi @scorpiock https://github.com/scorpiock it should work, but it could be colliding ports etc. How do you run it so I can reproduce? Do you use Docker or just NodeJS?

Best Peter

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sitespeedio/browsertime/issues/996?email_source=notifications&email_token=AEYO7ELJIIAKDAJQKQRMNXLQU73UZA5CNFSM4JQIJCQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE57VZY#issuecomment-557578983, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEYO7EN6FKWOMAJ5FB4NWDDQU73UZANCNFSM4JQIJCQA .

scorpiock avatar Nov 22 '19 18:11 scorpiock

One thing I would change is --resultDir and make sure you have unique result directories per test, else it will try to work on the same set of files and that will collide.

Do you get Could not load URLTimeoutError: timeout all the time or do you see other errors?

soulgalore avatar Nov 25 '19 02:11 soulgalore

that didn't help either. I tried what you suggested but got the same error.

# docker run --rm -v '/usr/local/prj/sto/temp':/browsertime sitespeedio/browsertime --screenshot --video --visualMetrics --useSameDir --iterations=1 --timeouts.pageLoad=15000 --viewPort=1366x768 --screenshotParams.type=png --screenshotParams.maxSize=1366 --videoParams.createFilmstrip=false --browser=chrome --userAgent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36" --resultDir=geekflare 'https://geekflare.com' 2>&1 Google Chrome 78.0.3904.87 Mozilla Firefox 70.0 [2019-11-25 07:08:07] INFO: Running tests using Chrome - 1 iteration(s) [2019-11-25 07:08:16] INFO: Testing url https://geekflare.com iteration 1 [2019-11-25 07:08:32] ERROR: Could not load URLTimeoutError: timeout (Session info: chrome=78.0.3904.87) [2019-11-25 07:08:32] ERROR: UrlLoadError: Failed to load https://geekflare.com at SeleniumRunner.loadAndWait (/usr/src/app/lib/core/seleniumRunner.js:232:13) at processTicksAndRejections (internal/process/task_queues.js:93:5) [2019-11-25 07:08:32] INFO: https://geekflare.com [2019-11-25 07:08:32] INFO: Wrote data to geekflare #

Couldn't load error all the time.

scorpiock avatar Nov 25 '19 07:11 scorpiock

This works for me. I tried running three tests at the same time on my Mac using Docker and it worked.

soulgalore avatar Dec 17 '23 05:12 soulgalore