<commit_before>---
title: Frequently Encountered Issues

menu:
  influxdb_013:
    weight: 0
    parent: troubleshooting
---

This page addresses frequent sources of confusion and places where InfluxDB behaves in an unexpected way relative to other database systems.
Where applicable, it links to outstanding issues on GitHub.

**Querying data**  

* [Understanding the time intervals returned from `GROUP BY time()` queries](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#understanding-the-time-intervals-returned-from-group-by-time-queries)    
* [Querying after `now()`](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#querying-after-now)  
* [Querying outside the min/max time range](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#querying-outside-the-min-max-time-range)  
* [Querying a time range that spans epoch 0](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#querying-a-time-range-that-spans-epoch-0)  
* [Querying with booleans](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#querying-with-booleans)  
* [Working with really big or really small integers](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#working-with-really-big-or-really-small-integers)
* [Doing math on timestamps](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#doing-math-on-timestamps)  
* [Getting an unexpected epoch 0 timestamp in query returns](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#getting-an-unexpected-epoch-0-timestamp-in-query-returns)  
* [Getting large query returns in batches when using the HTTP API](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#getting-large-query-returns-in-batches-when-using-the-http-api)  
* [Getting the `expected identifier` error, unexpectedly](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#getting-the-expected-identifier-error-unexpectedly)
* [Identifying write precision from returned timestamps](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#identifying-write-precision-from-returned-timestamps)  
* [Single quoting and double quoting in queries](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#single-quoting-and-double-quoting-in-queries)  
* [Missing data after creating a new `DEFAULT` retention policy](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#missing-data-after-creating-a-new-default-retention-policy)

**Writing data**  

* [Writing integers](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#writing-integers)   
* [Writing duplicate points](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#writing-duplicate-points)  
* [Getting an unexpected error when sending data over the HTTP API](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#getting-an-unexpected-error-when-sending-data-over-the-http-api)
* [Words and characters to avoid](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#words-and-characters-to-avoid)  
* [Single quoting and double quoting when writing data](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#single-quoting-and-double-quoting-when-writing-data)  

**Administration**  

* [Single quoting the password string](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#single-quoting-the-password-string)
* [Escaping the single quote in a password](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#escaping-the-single-quote-in-a-password)  
* [Identifying your version of InfluxDB](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#identifying-your-version-of-influxdb)  
* [Data aren't dropped after altering a retention policy](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#data-aren-t-dropped-after-altering-a-retention-policy)

# Querying data

## Understanding the time intervals returned from `GROUP BY time()` queries
With some `GROUP BY time()` queries, the returned time intervals may not reflect the time range specified in the `WHERE` clause.
In the example below the first [timestamp](/influxdb/v0.13/concepts/glossary/#timestamp) in the results occurs before the lower bound of the query:

Query with a two day `GROUP BY time()` interval:
<pre><code class="language-sh">
> SELECT count(water_level) FROM h2o_feet WHERE time >= <u><b>'2015-08-20T00:00:00Z'</b></u> AND time <= '2015-08-24T00:00:00Z' AND location = 'santa_monica' GROUP BY time(2d)
</code></pre>

Results:

<pre><code class="language-sh">name: h2o_feet
--------------
time			         count
<u><b>2015-08-19T00:00:00Z</b></u>	   240
2015-08-21T00:00:00Z	 480
2015-08-23T00:00:00Z	 241
</code></pre>

InfluxDB queries the `GROUP BY time()` intervals that fall within the `WHERE time` clause.
Default `GROUP BY time()` intervals fall on rounded calendar time boundaries.
Because they're rounded time boundaries, the start and end timestamps may appear to include more data than those covered by the query's `WHERE time` clause.

For the example above, InfluxDB works with two day intervals based on round number calendar days.
The rounded two day buckets in August are as follows (explanation continues below):

```
August 1st-2nd
August 3rd-4th
[...]
August 19th-20th
August 21st-22nd
August 23rd-24th
[...]
```

Because InfluxDB groups together August 19th and August 20th by default, August 19th is the first timestamp to appear in the results despite not being within the query's time range.
The number in the `count` column, however, only includes data that occur on or after August 20th as that is the time range specified by the query's `WHERE` clause.

Users may offset the default rounded calendar time boundaries by including an
[offset interval](/influxdb/v0.13/query_language/data_exploration/#configured-group-by-time-boundaries)
in their query.

## Querying after `now()`
By default, InfluxDB uses `now()` (the current nanosecond timestamp of the node that is processing the query) as the upper bound in queries.
You must provide explicit directions in the `WHERE` clause to query points that occur after `now()`.

The first query below asks InfluxDB to return everything from `hillvalley` that occurs between epoch 0 (`1970-01-01T00:00:00Z`) and `now()`.
The second query asks InfluxDB to return everything from `hillvalley` that occurs between epoch 0 and 1,000 days from `now()`.

`SELECT * FROM hillvalley`  
`SELECT * FROM hillvalley WHERE time < now() + 1000d`

## Querying outside the min/max time range
Queries with a time range that exceeds the minimum or maximum timestamps valid for InfluxDB currently return no results, rather than an error message.

Smallest valid timestamp: `-9023372036854775808` (approximately `1684-01-22T14:50:02Z`)  
Largest valid timestamp: `9023372036854775807` (approximately `2255-12-09T23:13:56Z`)

<dt> [GitHub Issue #3369](https://github.com/influxdb/influxdb/issues/3369)  </dt>

## Querying a time range that spans epoch 0
Currently, InfluxDB can return results for queries that cover either the time range before epoch 0 or the time range after epoch 0, not both.
A query with a time range that spans epoch 0 returns partial results.

<dt> [GitHub Issue #2703](https://github.com/influxdb/influxdb/issues/2703)  </dt>

## Querying with booleans
Acceptable boolean syntax differs for data writes and data queries.

| Boolean syntax |  Writes | Queries  |
-----------------------|-----------|--------------|
|  `t`,`f` |	👍 | ❌ |
|  `T`,`F` |  👍 |  ❌ |
|  `true`,`false` | 👍  | 👍  |
|  `True`,`False` |  👍 |  👍 |
|  `TRUE`,`FALSE` |  👍 |  👍 |

For example, `SELECT * FROM hamlet WHERE bool=True` returns all points with `bool` set to `TRUE`, but `SELECT * FROM hamlet WHERE bool=T` returns all points with`bool` set to `false`.
<commit_msg>errors are now returned on out of bounds timestamps<commit_after>---
title: Frequently Encountered Issues

menu:
  influxdb_013:
    weight: 0
    parent: troubleshooting
---

This page addresses frequent sources of confusion and places where InfluxDB behaves in an unexpected way relative to other database systems.
Where applicable, it links to outstanding issues on GitHub.

**Querying data**  

* [Understanding the time intervals returned from `GROUP BY time()` queries](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#understanding-the-time-intervals-returned-from-group-by-time-queries)    
* [Querying after `now()`](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#querying-after-now)  
* [Querying a time range that spans epoch 0](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#querying-a-time-range-that-spans-epoch-0)  
* [Querying with booleans](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#querying-with-booleans)  
* [Working with really big or really small integers](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#working-with-really-big-or-really-small-integers)
* [Doing math on timestamps](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#doing-math-on-timestamps)  
* [Getting an unexpected epoch 0 timestamp in query returns](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#getting-an-unexpected-epoch-0-timestamp-in-query-returns)  
* [Getting large query returns in batches when using the HTTP API](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#getting-large-query-returns-in-batches-when-using-the-http-api)  
* [Getting the `expected identifier` error, unexpectedly](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#getting-the-expected-identifier-error-unexpectedly)
* [Identifying write precision from returned timestamps](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#identifying-write-precision-from-returned-timestamps)  
* [Single quoting and double quoting in queries](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#single-quoting-and-double-quoting-in-queries)  
* [Missing data after creating a new `DEFAULT` retention policy](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#missing-data-after-creating-a-new-default-retention-policy)

**Writing data**  

* [Writing integers](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#writing-integers)   
* [Writing duplicate points](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#writing-duplicate-points)  
* [Getting an unexpected error when sending data over the HTTP API](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#getting-an-unexpected-error-when-sending-data-over-the-http-api)
* [Words and characters to avoid](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#words-and-characters-to-avoid)  
* [Single quoting and double quoting when writing data](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#single-quoting-and-double-quoting-when-writing-data)  

**Administration**  

* [Single quoting the password string](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#single-quoting-the-password-string)
* [Escaping the single quote in a password](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#escaping-the-single-quote-in-a-password)  
* [Identifying your version of InfluxDB](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#identifying-your-version-of-influxdb)  
* [Data aren't dropped after altering a retention policy](/influxdb/v0.13/troubleshooting/frequently_encountered_issues/#data-aren-t-dropped-after-altering-a-retention-policy)

# Querying data

## Understanding the time intervals returned from `GROUP BY time()` queries
With some `GROUP BY time()` queries, the returned time intervals may not reflect the time range specified in the `WHERE` clause.
In the example below the first [timestamp](/influxdb/v0.13/concepts/glossary/#timestamp) in the results occurs before the lower bound of the query:

Query with a two day `GROUP BY time()` interval:
<pre><code class="language-sh">
> SELECT count(water_level) FROM h2o_feet WHERE time >= <u><b>'2015-08-20T00:00:00Z'</b></u> AND time <= '2015-08-24T00:00:00Z' AND location = 'santa_monica' GROUP BY time(2d)
</code></pre>

Results:

<pre><code class="language-sh">name: h2o_feet
--------------
time			         count
<u><b>2015-08-19T00:00:00Z</b></u>	   240
2015-08-21T00:00:00Z	 480
2015-08-23T00:00:00Z	 241
</code></pre>

InfluxDB queries the `GROUP BY time()` intervals that fall within the `WHERE time` clause.
Default `GROUP BY time()` intervals fall on rounded calendar time boundaries.
Because they're rounded time boundaries, the start and end timestamps may appear to include more data than those covered by the query's `WHERE time` clause.

For the example above, InfluxDB works with two day intervals based on round number calendar days.
The rounded two day buckets in August are as follows (explanation continues below):

```
August 1st-2nd
August 3rd-4th
[...]
August 19th-20th
August 21st-22nd
August 23rd-24th
[...]
```

Because InfluxDB groups together August 19th and August 20th by default, August 19th is the first timestamp to appear in the results despite not being within the query's time range.
The number in the `count` column, however, only includes data that occur on or after August 20th as that is the time range specified by the query's `WHERE` clause.

Users may offset the default rounded calendar time boundaries by including an
[offset interval](/influxdb/v0.13/query_language/data_exploration/#configured-group-by-time-boundaries)
in their query.

## Querying after `now()`
By default, InfluxDB uses `now()` (the current nanosecond timestamp of the node that is processing the query) as the upper bound in queries.
You must provide explicit directions in the `WHERE` clause to query points that occur after `now()`.

The first query below asks InfluxDB to return everything from `hillvalley` that occurs between epoch 0 (`1970-01-01T00:00:00Z`) and `now()`.
The second query asks InfluxDB to return everything from `hillvalley` that occurs between epoch 0 and 1,000 days from `now()`.

`SELECT * FROM hillvalley`  
`SELECT * FROM hillvalley WHERE time < now() + 1000d`

## Querying a time range that spans epoch 0
Currently, InfluxDB can return results for queries that cover either the time range before epoch 0 or the time range after epoch 0, not both.
A query with a time range that spans epoch 0 returns partial results.

<dt> [GitHub Issue #2703](https://github.com/influxdb/influxdb/issues/2703)  </dt>

## Querying with booleans
Acceptable boolean syntax differs for data writes and data queries.

| Boolean syntax |  Writes | Queries  |
-----------------------|-----------|--------------|
|  `t`,`f` |	👍 | ❌ |
|  `T`,`F` |  👍 |  ❌ |
|  `true`,`false` | 👍  | 👍  |
|  `True`,`False` |  👍 |  👍 |
|  `TRUE`,`FALSE` |  👍 |  👍 |

For example, `SELECT * FROM hamlet WHERE bool=True` returns all points with `bool` set to `TRUE`, but `SELECT * FROM hamlet WHERE bool=T` returns all points with`bool` set to `false`.

{'fraction_non_alphanumeric': 0.11461949265687583, 'fraction_numerical': 0.03437917222963952, 'mean_word_length': 4.963773885350318, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 45, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5108440', 'n_tokens_mistral': 5242, 'n_tokens_neox': 4694, 'n_words': 1347}