> For the complete documentation index, see [llms.txt](https://docs.txflash.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.txflash.io/troubleshooting.md).

# Troubleshooting

## Repeated Broken pipe

The remote listener, proxy, or firewall closed the TCP connection. Common causes include:

* the application exits after reading one frame;
* unsupported DIRECT or ArbOS record handling;
* treating a TCP read as a complete frame;
* decoding multibyte fields with the wrong endianness;
* rejecting a valid non-L2 opaque message;
* a service restart, crash, OOM event, or idle timeout.

Log the sequence, ordinal, DIRECT record type, reconstruction kind, expected payload length, and actual payload length before closing.

## Invalid frame length

Read exactly 20 header bytes, apply `LENGTH_MASK = 0x0fffffff`, then read exactly the decoded payload length. TCP may split or combine protocol frames.

## Missing header on an item

Only ordinal zero contains header JSON. Cache it by sequence number and use it for later ordinals in the same sequence.

## Unsupported kind

Do not interpret every kind-like byte as an L2 kind. DIRECT record type, reconstruction kind, canonical `header.kind`, and raw L2 kind are separate fields.

## Sequence gap after reconnect

The relay resumes from a fresh sequence boundary without replaying stale backlog. Recover missing canonical sequences through the node's normal recovery mechanism.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.txflash.io/troubleshooting.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
