Error when running load test FATA[0052] stream error: stream ID 5; INTERNAL_ERROR

Hello! I’m getting the following error while executing my load test.

FATA[0052] stream error: stream ID 5; INTERNAL_ERROR

My options parameters contains:

export let options = {
	vus: 1000,
	minIterationDuration: '60s',
	duration: '5m',
	httpDebug: 'full',

Could you clarify this problem? How has this error appeared and how can it be avoided? We plan to run load tests with a large number of vus.


we need more information to help you out :slight_smile:

  • Can you post the output of k6 version?
  • Are you running k6 in a container or natively?
  • Can you post the relevant part of your script and the k6 command you used to run it?
  • Can you reproduce this issue by making requests to ?
  • Does the issue happen with less VUs or have you noticed a pattern that triggers it?


INTERNAL_ERROR is an http2 error which literally means the server had an unexpected internal problem. This is very likely some problem on the server or in the way k6 interacts with the server. There should be server logs for this. If you have any kind of API gateways you should probably look into them as well.

If this happens only under load I would argue it is the server being overloaded :). Try with smaller amounts of VUs and see if it disappears and go up until it starts again.

Some issues in the golang project (k6 is written in golang) has shown that possible problems are writing/reading too slow which is not a thing (that I think) k6 can do. Are you having particularly big bodies? Also a server side project has fixed that by reading the request body fully on the server. K6 does read fully the response bodies even if you wouldn’t need them for exactly this reason.

There is 36759, but both me and another colleague have been running huge tests recently and I don’t remember ever seeing INTERNAL_ERROR so I still would argue it is with the server and the golang version probably just changed how much traffic golang send and as that how much the server is under stress

@ned pointed out that your message actually isn’t an ERROR but a FATA(l) and I would guess this is because of httpdebug:true.

Can you disable it and try again. I expect that you will still see the error, but k6 will not stop executing?

Thank you! After I turned off the httpDebug parameter, K6 completed the test to the end.

@Daniil but did still output the errors? As maybe this is a problem with the dumping of the response in the httpdebug?

when I disabled the httpDebug parameter, I saw the following warnings when running the test. But in the end, k6 output the resulting metrics and completed the test in the normal order.

Okay so it seems the INTERNAL_ERROR is still there and wasn’t because of the way httpdebug dumps responses.

Your other error (invalid character) is probably because you parsing the body as a json, but you didn’t check the status code before that and what you are parsing is some html (starting with <) that is from an error page, although it could be other things.

Good luck :smiley:


I’m highly appreciate for your help. Unfortunately, i can’t send more details about problem because of the security policy in my company.

I think if u have security concern, why dont use and send an example for troubleshooting?

1 Like

The INTERNAL_ERROR with an HTTP/2 error code 13 indicates that the server had an unexpected internal problem.
Check if the request or response bodies are particularly large. Large bodies could cause issues with writing or reading data, leading to performance problems. Ensure that your server can handle the size of data being sent and received. Check the doc