# Problem code `'transaction-timeout'`

> Contract 2.0.0 · package sha256 `a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e` · generated from `configurator-runtime.d.ts`, `tables/problems.json` and `services/onsite-scripter/scripts/contract-docs-what-to-do.json` by `services/onsite-scripter/scripts/build-contract-docs.mjs`; edit the source, not this file.

A member of [`ProblemCode`](../api/ProblemCode.md) · stable · since 2.0.0

A transaction made no progress for `timeoutMs`, or hit the hold cap; it rolled back.

## What to do

The transaction made no progress for `timeoutMs` (10000 by default), or once it held the display, the hold lasted that long; it rolled back. Do slow non-runtime work (a `fetch`, a prompt to the shopper) before [`session.transaction(work)`](../api/Session.transaction.md) opens and only `tx` writes inside it; raise [`TransactionOptions.timeoutMs`](../api/TransactionOptions.timeoutMs.md) only for runtime loads that need longer.

```ts
const quote = await fetch('/api/quote').then((r) => r.json() as Promise<{ material: string }>);
await session.transaction(async (tx) => { await tx.select(fabricGroup, quote.material); });
```

The set is open: handle a code you don't know (`'other'`).

## Recorded by

- the table row `failure-matrix/cases/timeout` (`tables/failure-matrix.json`)
- the table row `hold/cases/case-3` (`tables/hold.json`)
