﻿# TRANSACTION_BUSY — another callback of this transaction is waiting for a callout of its own

On the in-tree backends (memory, SQLite, PostgreSQL) the callbacks of one transaction are served one at a time. A callback runs a write whose workflow may…

<em>cyoda-go version <a href="https://github.com/Cyoda/cyoda-go/releases/tag/v0.9.0">0.9.0</a></em>

# errors.TRANSACTION_BUSY

## NAME

TRANSACTION_BUSY — a callback was refused because another callback of the same transaction is paused in a callout of its own.

## SYNOPSIS

HTTP: `503` `Service Unavailable`. Retryable: `yes`. Over gRPC the code is the message prefix of the `CLIENT_ERROR` envelope.

## DESCRIPTION

On the in-tree backends (memory, SQLite, PostgreSQL) the callbacks of one transaction are served one at a time. A callback runs a write whose workflow may call out to a compute member again. While that inner callout is waiting for its answer, the callback is paused: it lets the transaction go, so that the callbacks of the inner callout can run, and only those. A sibling callback of the same transaction that arrives in that time is refused at once with this code, instead of waiting behind the paused one; so is a sibling already waiting when the pause begins. A callback that belongs to the paused callback's own callout is not a sibling and is admitted. A location-independent backend runs callbacks at the same time and never answers this code.

Nothing of the refused callback ran. Retryable: send it again once the paused callback has been answered.

The fix is in the compute node: send the callbacks of one transaction in series. Parallel callbacks gain nothing on a backend that serves one callback at a time, and on such a backend they only meet this refusal.

## SEE ALSO

- errors
- workflows
- errors.TRANSACTION_ROLLBACK_ONLY
- errors.TOO_MANY_JOINED_REQUESTS

## See also

- [`cyoda help errors`](/help/errors/) — Every error response from the Cyoda REST API carries a structured `errorCode` in the `properties` object. Multiple codes may share the same HTTP status. Programmatic handling keys on `errorCode`, not HTTP status.
- [`cyoda help workflows`](/help/workflows/) — A workflow definition is a named finite state machine attached to an entity model. Workflows are stored per model reference `(entityName, modelVersion)`. A model may have multiple workflow definitions; the engine selects the matching one per entity using the workflow-level `criterion` field, on every operation that runs the entity's workflow (see *Workflow-level selection*). When no `criterion` matches, the engine uses the default built-in workflow.
- [`cyoda help errors TRANSACTION_ROLLBACK_ONLY`](/help/errors/transaction_rollback_only/) — A compute member's callback — a request carrying a transaction token — joins the transaction of the operation that called the member out. When a write made that way fails with an answer that retrying cannot change, what that write and its workflow had already done in the transaction is discarded (a schema extension they made stays: `cyoda help models`, SCHEMA EXTENSION), and the transaction is marked: it can only be rolled back.
- [`cyoda help errors TOO_MANY_JOINED_REQUESTS`](/help/errors/too_many_joined_requests/) — On the in-tree backends (memory, SQLite, PostgreSQL) callbacks of one transaction are served **one at a time**: each holds the transaction for the time the server works on it, so callbacks sent in parallel are served in turn. The queue behind the callback being served is bounded by `CYODA_CALLOUT_JOINED_MAX_WAITERS` (default `128`), and a callback that arrives when the queue is full is refused rather than parked. The message does not carry the figure — see the rule below.

## Raw formats

- [`/help/errors/transaction_busy.json`](/help/errors/transaction_busy.json) — full descriptor (matches `GET /help/{topic}` envelope)
- [`/help/errors/transaction_busy.md`](/help/errors/transaction_busy.md) — body only