Troubleshoot issues writing data
Learn how to avoid unexpected results and recover from errors when writing to InfluxDB 3 Core.
Handle write responses
InfluxDB 3 Core 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 in the batch and returns one of the following HTTP status codes:
204 No Content: All data in the batch is ingested.400 Bad Request: 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, up to 100 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 3 Core uses conventional HTTP status codes to indicate the success
or failure of a request. The message property of the response body may contain
additional details about the error.
Write requests return the following status codes:
| HTTP response code | Message | Description |
|---|---|---|
204 "Success" | If InfluxDB ingested the data | |
400 "Bad request" | error details about rejected points, up to 100 points: line contains the first rejected line, message describes rejections | If some or all request data isnโt allowed (for example, if it is malformed or falls outside of the bucketโs retention period)โthe response body indicates whether a partial write has occurred or if all data has been rejected |
401 "Unauthorized" | If the Authorization header is missing or malformed or if the token doesnโt have permission to write to the database. See write API examples using credentials. | |
404 "Not found" | requested resource type (for example, โorganizationโ or โdatabaseโ), and resource name | If a requested resource (for example, organization or database) wasnโt found |
500 "Internal server error" | Default status for an error | |
503 โService unavailableโ | If the server is temporarily unavailable to accept writes. The Retry-After header describes when to try the write again. |
If your data did not write to the database, see how to troubleshoot rejected points.
Troubleshoot failures
If you notice data is missing in your database, do the following:
- Check the
messageproperty in the response body for details about the error. - If the
messagedescribes a field error, troubleshoot rejected points. - Verify all lines contain valid syntax (line protocol).
- Verify the timestamps in your data match the precision parameter in your request.
- Minimize payload size and network errors by optimizing writes.
Troubleshoot rejected points
InfluxDB rejects points that donโt match the schema of existing data.
Check for field data type
differences between the rejected data point and points within the same
databaseโ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 3 Core and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.