artilleryio / artillery

The complete load testing platform. Everything you need for production-grade load tests. Serverless & distributed. Load test with Playwright. Load test HTTP APIs, GraphQL, WebSocket, and more. Use any Node.js module.
https://www.artillery.io
Mozilla Public License 2.0
8.02k stars 510 forks source link

xhr poll error and xhr post error #3401

Open OwaisKodexo opened 4 hours ago

OwaisKodexo commented 4 hours ago
config:
  target: "https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  phases:
    - duration: 60
      arrivalRate: 1
      name: "Warm Up"

    - duration: 60
      arrivalRate: 50
      name: "Sustained Load"

  engines:
    socketio:
      transports: ["websocket"]

  headers:
    extraHeaders:
      Authorization: "Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

scenarios:
  - name: "Sending messages"
    engine: "socketio"
    flow:
      - emit:
          channel: "chat.message.text"
          data:
            user_query: "{{ randomMessage }}"
            session_id: "thread_xxxxxxxxxxxxxxxxxxxxxxx"
            is_audio: false
          count: 1  
    payload:
      randomMessage:
        - "How are you?"
        - "Hello there!"
        - "I need some advice."
        - "Can you help me?"
        - "What's the best way to handle stress?"
*********************************************************************************************************

errors.Error: xhr poll error: .................................................. 247
errors.Error: xhr post error: .................................................. 195
socketio.emit: ................................................................. 39
socketio.emit_rate: ............................................................ 7/sec
socketio.response_time:
  min: ......................................................................... 0.1
  max: ......................................................................... 1.5
  mean: ........................................................................ 0.7
  median: ...................................................................... 0.8
  p95: ......................................................................... 1.4
  p99: ......................................................................... 1.4
vusers.completed: .............................................................. 39
vusers.created: ................................................................ 500
vusers.created_by_name.Sending messages: ....................................... 500
vusers.failed: ................................................................. 442
vusers.session_length:
  min: ......................................................................... 617.2
  max: ......................................................................... 1516.8
  mean: ........................................................................ 831.1
  median: ...................................................................... 820.7
  p95: ......................................................................... 1130.2
  p99: ......................................................................... 1353.1

**********************************************************************************************************
Debug Report  

   2024-11-08T10:11:09.969Z socketio Error: xhr poll error
    at XHR.onError (/usr/local/lib/node_modules/artillery/node_modules/engine.io-client/build/cjs/transport.js:48:37)
    at Request.<anonymous> (/usr/local/lib/node_modules/artillery/node_modules/engine.io-client/build/cjs/transports/polling-xhr.js:64:18)
    at Emitter.emit (/usr/local/lib/node_modules/artillery/node_modules/@socket.io/component-emitter/lib/cjs/index.js:143:20)
    at Request._onError (/usr/local/lib/node_modules/artillery/node_modules/engine.io-client/build/cjs/transports/polling-xhr.js:173:14)
    at Timeout._onTimeout (/usr/local/lib/node_modules/artillery/node_modules/engine.io-client/build/cjs/transports/polling-xhr.js:146:30)
    at listOnTimeout (node:internal/timers:594:17)
OwaisKodexo commented 3 hours ago

My issue has been resolved I remove the "engines" and after target socketio: transports: ["websocket"]

now its look like this

config:
  target: "https://<your website>
  socketio:
    transports: ["websocket"]
  phases:
    - duration: 60
      arrivalRate: 10
      name: "<name>"