Documentation

Troubleshoot issues writing data

This page documents an earlier version of InfluxDB OSS. InfluxDB 3 Core is the latest stable version.

Learn how to avoid unexpected results and recover from errors when writing to InfluxDB.

Handle write and delete responses

InfluxDB does the following when you send a write request:

  1. Validates the request.

  2. If successful, attempts to ingest data from the request body; otherwise, responds with an error status.

  3. Ingests or rejects data from the batch and returns one of the following HTTP status codes:

    • 204 No Content: All of the data is ingested and queryable.
    • 422 Unprocessable Entity: Some or all of the data has been rejected. Data that has not been rejected is ingested and queryable.

    The response body contains error details about rejected points.

Writes are synchronous–the response status indicates the final status of the write and all ingested data is queryable.

To ensure that InfluxDB handles writes in the order you request them, wait for the response before you send the next request.

Review HTTP status codes

InfluxDB uses conventional HTTP status codes to indicate the success or failure of a request. Write requests return the following status codes:

  • 204 Success: All request data was written to the bucket.
  • 400 Bad request: The response body contains the first malformed line in the data. All request data was rejected and not written.
  • 401 Unauthorized: May indicate one of the following:
    • Authorization: Token header is missing or malformed.
    • API token value is missing from the header.
    • API token does not have sufficient permissions to write to the organization and the bucket. For more information about token types and permissions, see Manage API tokens.
  • 404 Not found: A requested resource, such as an organization or bucket, was not found. The response body contains the requested resource type (for example, “organization”) and resource name.
  • 413 Request entity too large: All request data was rejected and not written. InfluxDB OSS only returns this error if the Go (golang) ioutil.ReadAll() function raises an error.
  • 422 Unprocessable entity: The request was well-formed, but some or all the points were rejected due to semantic errors–for example, schema conflicts or retention policy violations.
  • 500 Internal server error: Default HTTP status for an error.
  • 503 Service unavailable: Server is temporarily unavailable to accept writes. The Retry-After header describes when to try the write again.

The message property of the response body may contain additional details about the error. If some of your data did not write to the bucket, see how to troubleshoot rejected points.

Troubleshoot failures

If you notice data is missing in your bucket, do the following:

Troubleshoot rejected points

When writing points from a batch, InfluxDB rejects points that have syntax errors or schema conflicts.

If InfluxDB processes the data in your batch and then rejects points, the HTTP response body contains the following properties that describe rejected points:

  • code: "unprocessable entity"
  • message: a string that describes the reason points were rejected and may provide details, such as database, retention policy, and which bound was violated.

For example, the following message indicates that points were rejected because the timestamps fall outside the 1d retention policy:

failure writing points to database: partial write: dropped 4 points outside retention policy of duration 24h0m0s - oldest point home,room=Living\\ Room at 1970-01-01T00:00:01.541Z dropped because it violates a Retention Policy Lower Bound at 2025-05-20T19:06:17.612973Z, newest point home,room=Living\\ Room at 1970-01-01T00:00:01.5410006Z dropped because it violates a Retention Policy Lower Bound at 2025-05-20T19:06:17.612973Z dropped=4 for database: 9f282d63c7d3a5c0 for retention policy: autogen
  • Copy
  • Fill window

InfluxDB rejects points for the following reasons:

  • a line protocol parsing error
  • an invalid timestamp
  • a schema conflict
  • retention policy violation

Schema conflicts occur when you try to write data that contains any of the following:

  • The batch contains another point with the same series, but one of the fields has a different value type.
  • The bucket contains another point with the same series, but one of the fields has a different value type.

Check for field type differences between the missing data point and other points that have the same series–for example, did you attempt to write string data to an int field?


Was this page helpful?

Thank you for your feedback!


The future of Flux

Flux is going into maintenance mode. You can continue using it as you currently are without any changes to your code.

Read more

Now Generally Available

InfluxDB 3 Core and Enterprise

Start fast. Scale faster.

Get the Updates

InfluxDB 3 Core is an open source, high-speed, recent-data engine that collects and processes data in real-time and persists it to local disk or object storage. InfluxDB 3 Enterprise builds on Core’s foundation, adding high availability, read replicas, enhanced security, and data compaction for faster queries and optimized storage. A free tier of InfluxDB 3 Enterprise is available for non-commercial at-home or hobbyist use.

For more information, check out: