InfluxDB issues

Hi all,

I’m getting the following influxDB error:

ERRO[44590] InfluxDB: Couldn’t write stats error="{“error”:"partial write: max-values-per-tag limit exceeded (100000/100000): measurement=\“http_reqs\” tag=\“name\” value=\"https://2

[HTTP REQ REMOVED)" dropped=8"}\n"

This is a standard ‘measurement’ and ‘tag’ from k6, so I don’t think I can fix it in the script. Is this a known issue with a workaround?

Thanks, Si

Hi @sstratton,

You can look at the original issue here. Basically InfluxDB has a limit on how many different values each tag for a metric can have … as if it’s too much it will get terrible performance. I would argue 100000 is probably too high of a value … but it is what it is.

The solution is that you can:

  1. Group urls with the tag name-this way you can even filter using that later. I would expect that with 100000 different values of name (it defaults to the value of the url tag).
  2. If you don’t want certain system tags you can use the options to set only the ones you want (if any)
  3. Set the env variable K6_INFLUXDB_TAGS_AS_FIELDS to “vu,iter,url,name” (the first three are the default values) or whatever else you want to get as values instead of tags. Unfortunately, this is not documented

I would argue that if you are going to use this you will need to play around with the first two(and possibly even the third) in order to get it to a place where you have the data you want and InfluxDB isn’t swamped with data.
You are also probably better of deleting all the data when you do that as it will help InfluxDB perform a lot better :smiley:

1 Like