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:
Validates the request.
If successful, attempts to ingest data from the request body; otherwise, responds with an error status.
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. TheRetry-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:
- Check the HTTP status code in the response.
- Check the
message
property in the response body for details about the error–for example,partial write
indicates rejected points. - Verify all lines contain valid syntax (line protocol or CSV).
- Verify the timestamps match the precision parameter in your request.
- Minimize payload size and network errors by optimizing writes.
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
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!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.