This topic describes common error messages in Time Series Database (TSDB) for InfluxDB® and the corresponding solutions.
Deal with the "database name required" error message
If no database is specified for a SHOW
query, the database name required
error message is reported. To specify a database, use the ON
clause in the SHOW
statement, the USE <database_name>
statement in the CLI, or the db
parameter in an HTTP API request.
SHOW
queries include the SHOW RETENTION POLICIES
, SHOW SERIES
, SHOW MEASUREMENTS
, SHOW TAG KEYS
, SHOW TAG VALUES
, and SHOW FIELD KEYS
statements.
Deal with the "max series per database exceeded: < >" error message
If the maximum number of series per database is exceeded during a write request, the max series per database exceeded: < >
error message is reported. The maximum number of series per database is determined by the instance type of your instance.
The information displayed in the angle bracket (< >
) shows the measurements and tag sets of the series that exceed the upper limit specified by max-series-per-database
.
Deal with the "found < >, expected identifier at line < >, char < >" error message
InfluxQL syntax
If TSDB For InfluxDB® cannot find an expected identifier in a query, the
found < >, expected identifier at line < >, char < >
error message is reported. Identifiers can be continuous query names, database names, field keys, measurement names, retention policy names, subscription names, tag keys, or usernames. This error message prompts you to check your query syntax.Example
> SELECT * FROM WHERE "blue"= true ERR: error parsing query: found WHERE, expected identifier at line 1, char 15
In the preceding statement, a measurement name is missing between
FROM
andWHERE
.InfluxQL keyword
If one of the identifiers in a query is an InfluxQL keyword, the
expected identifier
error message is reported. If an identifier in your query is an InfluxQL keyword, enclose the identifier in double quotation marks (").Example
> SELECT duration FROM runs ERR: error parsing query: found DURATION, expected identifier, string, number, bool at line 1, char 8
In the preceding statement, the
duration
field key is an InfluxQL keyword. To prevent this error, encloseduration
in double quotation marks (").> SELECT "duration" FROM runs
Deal with the "found < >, expected string at line < >, char < >" error message
If TSDB For InfluxDB® cannot find an expected string in a query, the found < >, expected string at line < >, char < >
error message is reported.
Deal with the "mixing aggregate and non-aggregate queries is not supported" error message
If the SELECT
statement includes both an aggregate function and a field or tag key that is not aggregated, the mixing aggregate and non-aggregate queries is not supported
error message is reported.
An aggregate function returns a single aggregated value. No single value can be returned for a field or tag key that is not aggregated.
Examples
Raw data: The peg
measurement includes the square
and round
fields and the force
tag.
name: peg
---------
time square round force
2016-10-07T18:50:00Z281
2016-10-07T18:50:10Z4122
2016-10-07T18:50:20Z6144
2016-10-07T18:50:30Z7153
Query 1:
> SELECT mean("square"),"round" FROM "peg"
ERR: error parsing query: mixing aggregate and non-aggregate queries is not supported
The preceding statement includes an aggregate function and a standalone field.
The mean("square")
function returns a single aggregated value, which is an average of the four values of square
in the peg
measurement. However, no single value can be returned for the four values of the round
field that are not aggregated.
Query 2:
> SELECT mean("square"),"force" FROM "peg"
ERR: error parsing query: mixing aggregate and non-aggregate queries is not supported
The preceding statement includes an aggregate function and a standalone tag.
The mean("square")
function returns a single aggregated value, which is an average of the four values of square
in the peg
measurement. However, no single value can be returned for the four values of the force
tag that are not aggregated.
Deal with the "time and *influxql.VarRef are not compatible" error message
If date and time strings are enclosed in double quotation marks (") in a query, the time and *influxql.VarRef are not compatible
error message is reported. You must use single quotation marks (') to enclose date and time strings.
Example
Enclose date and time strings in double quotation marks ('').
> SELECT "water_level" FROM "h2o_feet" WHERE "location"='santa_monica' AND time >="2015-08-18T00:00:00Z" AND time <="2015-08-18T00:12:00Z"
ERR: invalid operation: time and *influxql.VarRef are not compatible
Enclose date and time strings in single quotation marks (').
> SELECT "water_level" FROM "h2o_feet" WHERE "location"='santa_monica' AND time >='2015-08-18T00:00:00Z' AND time <='2015-08-18T00:12:00Z'
name: h2o_feet
time water_level
---------------
2015-08-18T00:00:00Z2.064
2015-08-18T00:06:00Z2.116
2015-08-18T00:12:00Z2.028
Deal with the "bad timestamp" error message
Timestamp syntax
If the line protocol includes a timestamp that is not in the UNIX format, the
bad timestamp
error message is reported.Example
> INSERT pineapple value=1'2015-08-18T23:00:00Z' ERR:{"error":"unable to parse 'pineapple value=1 '2015-08-18T23:00:00Z'': bad timestamp"}
In this example, the line protocol uses a timestamp in the RFC 3339 format. To prevent this error, change the timestamp to the UNIX format.
> INSERT pineapple,fresh=true value=11439938800000000000
Line protocol syntax
If the line protocol includes general syntax errors, the
bad timestamp
error message is reported.Examples
Write request 1:
> INSERT hens location=2 value=9 ERR:{"error":"unable to parse 'hens location=2 value=9': bad timestamp"}
In the preceding statement, the line protocol separates the
hen
measurement from thelocation=2
tag by using a space instead of a comma (,). As a result, TSDB For InfluxDB® considers thevalue=9
field as a timestamp and returns the error message.To prevent this error, use a comma (,) to separate the measurement from the tag.
> INSERT hens,location=2 value=9
Write request 2:
> INSERT cows,name=daisy milk_prod=3 happy=3 ERR:{"error":"unable to parse 'cows,name=daisy milk_prod=3 happy=3': bad timestamp"}
In the preceding statement, the line protocol separates the
milk_prod=3
field from thehappy=3
field by using a space instead of a comma (,). As a result, TSDB For InfluxDB® considers thehappy=3
field as a timestamp and returns the error message.To prevent this error, use a comma (,) to separate the two fields.
> INSERT cows,name=daisy milk_prod=3,happy=3
Deal with the "time outside range" error message
If the timestamp in the line protocol falls out of the valid time range of TSDB For InfluxDB®, the time outside range
error message is reported.
The minimum valid timestamp is -9223372036854775806
or 1677-09-21T00:12:43.145224194Z
. The maximum valid timestamp is 9223372036854775806
or 2262-04-11T23:47:16.854775806Z
.
Deal with the "engine: cache maximum memory size exceeded" error message
If the cached memory size of the server exceeds the preset threshold in a short period of time, the engine: cache maximum memory size exceeded
error message is reported. The preset threshold is determined by the instance type of your instance.