Documentation

Troubleshoot issues writing data

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

Handle write responses

In InfluxDB Cloud Serverless, writes are synchronous. After InfluxDB validates the request and ingests the data, it sends a success response (HTTP 204 status code) as an acknowledgement that the data is written and queryable. To ensure that InfluxDB handles writes in the order you request them, wait for the acknowledgement before you send the next request.

If InfluxDB successfully writes all the request data to the database, it returns success (HTTP 204 status code). The first rejected point in a batch causes InfluxDB to reject the entire batch and respond with an HTTP error status.

Review HTTP status codes

InfluxDB 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 codeMessageDescription
204 "Success"If InfluxDB ingested the data
400 "Bad request"message contains the first malformed lineIf request data is malformed
401 "Unauthorized"If the Authorization header is missing or malformed or if the token doesn’t have permission to write to the database. See examples using credentials in write requests.
404 "Not found"requested resource type (for example, “organization” or “database”), and resource nameIf a requested resource (for example, organization or database) wasn’t found
413 “Request too large”cannot read data: points in batch is too largeIf a request exceeds the maximum global limit
429 “Too many requests”Retry-After header: xxx (seconds to wait before retrying the request)If a request exceeds your plan’s adjustable service quotas
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.

The message property of the response body may contain additional details about the error. 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:

Troubleshoot rejected points

InfluxDB rejects points for the following reasons:

  • 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 data 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!


Introducing InfluxDB Clustered

A highly available InfluxDB 3.0 cluster on your own infrastructure.

InfluxDB Clustered is a highly available InfluxDB 3.0 cluster built for high write and query workloads on your own infrastructure.

InfluxDB Clustered is currently in limited availability and is only available to a limited group of InfluxData customers. If interested in being part of the limited access group, please contact the InfluxData Sales team.

Learn more
Contact InfluxData Sales

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.

Flux is going into maintenance mode and will not be supported in InfluxDB 3.0. This was a decision based on the broad demand for SQL and the continued growth and adoption of InfluxQL. We are continuing to support Flux for users in 1.x and 2.x so you can continue using it with no changes to your code. If you are interested in transitioning to InfluxDB 3.0 and want to future-proof your code, we suggest using InfluxQL.

For information about the future of Flux, see the following:

State of the InfluxDB Cloud Serverless documentation

InfluxDB Cloud Serverless documentation is a work in progress.

The new documentation for InfluxDB Cloud Serverless is a work in progress. We are adding new information and content almost daily. Thank you for your patience!

If there is specific information you’re looking for, please submit a documentation issue.

InfluxDB Cloud Serverless