Http_req_failed possible to get more detail?

Hi :grinning:
I am getting a lot of http_req_failed…: 66.98% ✓ 537704.
How can I dig deeper and find out what error code they are issuing, why does K6 only gives you a total number and percentage?
Would it be possible to get more details?
I used k6 run --http-debug=full script.js but it did not help.

✗ status was 200
      ↳  33% — ✓ 265025 / ✗ 537704
     checks.........................: 33.01% ✓ 265025     ✗ 537704
     data_received..................: 131 MB 75 kB/s
     data_sent......................: 87 MB  50 kB/s
     http_req_blocked...............: avg=16.98µs  min=198ns    med=728ns    max=70.5ms   p(90)=1.13µs   p(95)=1.26µs  
     http_req_connecting............: avg=2.16µs   min=0s       med=0s       max=26.8ms   p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=537.28ms min=848.36µs med=3.75ms   max=34.02s   p(90)=1.05s    p(95)=2.3s    
       { expected_response:true }...: avg=791.85ms min=6.6ms    med=170.95ms max=16.6s    p(90)=2.5s     p(95)=3.18s   
     http_req_failed................: 66.98% ✓ 537704     ✗ 265025
     http_req_receiving.............: avg=11.58ms  min=10.64µs  med=137.53µs max=4.01s    p(90)=3.37ms   p(95)=91.75ms 
     http_req_sending...............: avg=301.53µs min=35.29µs  med=133.79µs max=102.69ms p(90)=414.11µs p(95)=779.38µs
     http_req_tls_handshaking.......: avg=13.21µs  min=0s       med=0s       max=68.53ms  p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=525.4ms  min=0s       med=3.12ms   max=34.02s   p(90)=983.51ms p(95)=2.27s   
     http_reqs......................: 802729 459.824411/s
     iteration_duration.............: avg=1.53s    min=1s       med=1s       max=35.02s   p(90)=2.06s    p(95)=3.3s    
     iterations.....................: 802729 459.824411/s
     vus............................: 115    min=4        max=1200
     vus_max........................: 1200   min=1200     max=1200

Hi fatkobra,

It seems like this answer here is what you might be looking for. Could you check it out let us know whether it solves your issue?

This document might help as well. Also, this one.

Thanks.

Hi @inanc ,

Thank you so much for your help. I read the 3 articles you suggested but I had already used the debug option --http-debug=full, but it did not give more detail.

However, I increased the number of Kubernetes pods from 2 to 10 pods, and the problem is one.

I had very high latency with 2 pods and the timeout was smaller.

iteration_duration.............:       max=35.02s