<commit_before>---
title: Out of Order Writes
weight: 60
---
# Enabling Out of Order writes.

Enabling out of order writes involves two configuration options in Loki:

- `ingester.unordered-writes-enabled` must be enabled
- `ingester.max-chunk-age` (default 1h) is used to parameterize _how far back out of order data is accepted_.

When unordered writes are enabled, Loki will accept older data for each stream as far back as `most_recent_line - (max_chunk_age/2)`. For instance, if `ingester.max-chunk-age=2h` and the stream `{foo="bar"}` has one entry at `8:00`, Loki will accept data for that stream as far back in time as `7:00`. If another log line is wrritten at `10:00`, this boundary changes to `9:00`. Anything farther back than this range will still return an _out of order_ error.
<commit_msg>Docs: revise section header (out of order writes) (#4134)<commit_after>---
title: Out of order writes
weight: 60
---
# Out of order writes

Enabling out of order writes involves two configuration options in Loki:

- `ingester.unordered-writes-enabled` must be enabled
- `ingester.max-chunk-age` (default 1h) is used to parameterize _how far back out of order data is accepted_.

When unordered writes are enabled, Loki will accept older data for each stream as far back as `most_recent_line - (max_chunk_age/2)`. For instance, if `ingester.max-chunk-age=2h` and the stream `{foo="bar"}` has one entry at `8:00`, Loki will accept data for that stream as far back in time as `7:00`. If another log line is wrritten at `10:00`, this boundary changes to `9:00`. Anything farther back than this range will still return an _out of order_ error.

{'fraction_non_alphanumeric': 0.08576642335766424, 'fraction_numerical': 0.024330900243309004, 'mean_word_length': 4.358306188925082, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '6326399', 'n_tokens_mistral': 502, 'n_tokens_neox': 476, 'n_words': 241}