Quantcast
Channel: Grafana k6 - Grafana Labs Community Forums
Viewing all articles
Browse latest Browse all 357

Console log error when open 2 tabs on k6/browser for more than 6 vus

$
0
0

I’m trying to open 2 tabs in a chromium browser.
It works as expected when reach the 6 VUS, after that the console shows the following error message:
Note the code souce is available after error message.

I’m working on Windows, with VS Code and K6 version - k6.exe v0.57.0 (commit/50afd82c18, go1.23.6, windows/amd64)

Someone can help me please?

Error message

     execution: local
        script: tests/customer_requests/connect2/239684_livechat_c2_che.js
        output: -

     scenarios: (100.00%) 1 scenario, 10 max VUs, 10m30s max duration (incl. graceful stop):
              * LOAD: 1 iterations for each of 10 VUs (maxDuration: 10m0s, gracefulStop: 30s)

ERRO[0006] cleaning up the user data directory: remove C:\Users\mtari\AppData\Local\Temp\k6browser-data-3074598189\lockfile: The process cannot access the file because it is being used by another process.  category="Browser:Close" elapsed="0 ms" source=browser
ERRO[0006] cleaning up the user data directory: remove C:\Users\mtari\AppData\Local\Temp\k6browser-data-1484776667\lockfile: The process cannot access the file because it is being used by another process.  category="Browser:Close" elapsed="0 ms" source=browser
ERRO[0007] cleaning up the user data directory: remove C:\Users\mtari\AppData\Local\Temp\k6browser-data-3246492595\lockfile: The process cannot access the file because it is being used by another process.  category="Browser:Close" elapsed="0 ms" source=browser
ERRO[0007] cleaning up the user data directory: remove C:\Users\mtari\AppData\Local\Temp\k6browser-data-257758181\lockfile: The process cannot access the file because it is being used by another process.  category="Browser:Close" elapsed="0 ms" source=browser
ERRO[0007] process with PID 14340 unexpectedly ended: exit status 1  category=browser elapsed="1434 ms" source=browser
ERRO[0007] process with PID 34756 unexpectedly ended: exit status 1  category=browser elapsed="681 ms" source=browser                                                                                                                   
ERRO[0007] process with PID 19076 unexpectedly ended: exit status 1  category=browser elapsed="892 ms" source=browser
ERRO[0007] process with PID 13264 unexpectedly ended: exit status 1  category=browser elapsed="1148 ms" source=browser                                                                                                                  
ERRO[0008] process with PID 55688 unexpectedly ended: exec: canceling Cmd: invalid argument  category=browser elapsed="0 ms" source=browser
ERRO[0008] process with PID 26196 unexpectedly ended: exec: canceling Cmd: TerminateProcess: Access is denied.  category=browser elapsed="0 ms" source=browser

     browser_data_received.......: 21 MB  1.9 MB/s
     browser_data_sent...........: 192 kB 18 kB/s
     browser_http_req_duration...: avg=125.91ms min=15.04ms med=112ms    max=933.67ms p(90)=227.28ms p(95)=267.79ms
     browser_http_req_failed.....: 0.00%  0 out of 308
     browser_web_vital_fcp.......: avg=908.8ms  min=544ms   med=898ms    max=1.7s     p(90)=1.1s     p(95)=1.18s
     browser_web_vital_ttfb......: avg=624.38ms min=294ms   med=655.45ms max=1.53s    p(90)=905.57ms p(95)=946.39ms
     data_received...............: 0 B    0 B/s
     data_sent...................: 0 B    0 B/s
     iteration_duration..........: avg=3.82s    min=2.97s   med=3.97s    max=4.45s    p(90)=4.35s    p(95)=4.4s
     iterations..................: 10     0.922097/s
     vus.........................: 4      min=4        max=10
     vus_max.....................: 10     min=10       max=10

Script

import { sleep } from 'k6';
import { browser } from 'k6/browser';
const scenarios = {
  LOAD: {
    executor: 'per-vu-iterations',
    vus: 10,
    iterations: 1,
    options: {
      browser : {
        type: 'chromium',
        // headless: false
        // args: ['--no-sandbox'],
      }
    },
  },
}

export const options = {
  scenarios : { LOAD : scenarios['LOAD']} ,
};
export function setup(){
}


export default async function (data) {
    const context = await browser.newContext();

    const sfPage = await context.newPage();
    sfPage.setDefaultTimeout(60000);
    await sfPage.goto(' https://yahoo.com');
    await sfPage.screenshot({ path: `screenshots/${__VU}-${__ITER}_01_yahoo_page.png` });
    
    
    // creating Mobile Web env./page
    const mwPage = await context.newPage();
    mwPage.setDefaultTimeout(60000);
    
    // login mobile web page
    await mwPage.screenshot({ path: `screenshots/${__VU}-${__ITER}_05_google_before.png` });
    await mwPage.goto('https://google.com');
    await mwPage.screenshot({ path: `screenshots/${__VU}-${__ITER}_10_google_open.png` });
}

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 357

Trending Articles