现象:
往influxdb中写入数据时,出现Max Values per Tag Influxdb Write Tags报错。
原因:
官方文档说明: https://docs.influxdata.com/influxdb/v1.2/administration/config#max-values-per-tag-100000
max-values-per-tag = 100000
The maximum number of tag values allowed per tag key. The default setting is 100000. Change the setting to 0 to allow an unlimited number of tag values per tag key. If a tag value causes the number of tag values of a tag key to exceed max-values-per-tag InfluxDB will not write the point, and it returns a partial write error.
Any existing tag keys with tag values that exceed max-values-per-tag will continue to accept writes, but writes that create a new tag value will fail.
Environment variable: INFLUXDB_DATA_MAX_VALUES_PER_TAG
默认每个tag只允许插入10W个tag value。
解决方法:
修改max-values-per-tag=0,则可以忽略每个tag的插入上限。
修改的文件为:/etc/influxdb/influxdb.conf中。(ubuntu系统中的配置文件位置)
修改后重启influxdb服务。