Untuk agen AI: markdown halaman ini — /docs-content-en/infra/galaxy-sleep.md indeks dokumentasi — /llms.txt

Artikel dokumentasi saat ini tersedia dalam bahasa Inggris.

Galaxy app sleep and wake

A Galaxy app goes to sleep when idle, together with the galaxy that carries it, and while it sleeps its container is stopped. This page describes what exactly stops, which fields report the real state, how to bring the app up and how long that takes.

What stops · State fields · How to bring it up · Logs · Recurring wake window

What stops during sleep

The app runs in a container on a shared host — the galaxy. Both parts can sleep, and these are different states.

What sleeps How it looks What it takes to bring up
What sleepsThe app container, the galaxy stays up How it looksThe app does not respond, while neighbouring apps on the same galaxy keep working What it takes to bring upStarting the container — seconds
What sleepsThe galaxy together with every container on it How it looksNo app of that galaxy answers What it takes to bring upBooting the galaxy machine, then starting the container — minutes

The persistent /data volume survives sleep. Waking starts the same container instead of creating a new one, so the lines the app wrote to its output stream before it slept are available after the wake too. A fully new container appears only on the next code upload, and that upload does not keep the previous container's log.

The status and reachability fields answer different questions

The status field in the GET /v1/infra/servers/:id response is the state of the app's record on the platform. A wake moves the record to running at the end, once the container is already started, so while the galaxy is coming up the record stays sleeping — on a cold machine that takes minutes. The opposite divergence is possible as well: the record can read running while the container is no longer working.

That is why the reachability block sits next to it — it answers the question "can the app respond right now". The block is present only for an app whose kind is GALAXY_APP; for every other server type it is null.

JSON
{
  "success": true,
  "data": {
    "id": "e22bb297-8a0a-4597-9b42-47d059cd1090",
    "kind": "GALAXY_APP",
    "status": "sleeping",
    "reachability": {
      "effectiveStatus": "running",
      "hostStatus": "running",
      "hostTunnel": "CONNECTED",
      "container": "running",
      "forwarder": "active",
      "publicEntry": "live",
      "probe": "ok",
      "probedAt": "2026-08-12T13:24:58.117Z"
    }
  }
}

Only the sleep-related fields are shown. For the full response, see GET /v1/infra/servers/:id.

Field Description
FieldeffectiveStatus DescriptionThe overall availability status — running, sleeping, waking, unreachable or unknown. How it is derived is shown in the table below
FieldhostStatus DescriptionState of the carrying galaxy, using the same values as the server status
FieldhostTunnel DescriptionThe galaxy's connection to the platform — CONNECTED, DISCONNECTED or NONE
Fieldcontainer DescriptionThe app container — running, stopped or unknown. The value unknown means the platform could not look, not that the container is stopped
Fieldforwarder DescriptionRouting to the container on the host — active, inactive or unknown. It stops together with the container during sleep
FieldpublicEntry DescriptionThe app's public address — live (the gateway holds a live tunnel for the app subdomain), no-tunnel (there is no tunnel, so the address serves nothing from outside) or unknown (the gateway could not be asked). The value unknown never worsens the verdict
Fieldprobe DescriptionHow the live host check ended — ok, host-down (the galaxy is asleep or unreachable and no check was sent), host-busy (the host is occupied by another operation), failed or not-attempted
FieldprobedAt DescriptionCheck time in ISO 8601. The value null means no check happened

How effectiveStatus is derived:

State effectiveStatus
StateThe galaxy is booting effectiveStatuswaking
StateThe galaxy is asleep effectiveStatussleeping
StateThe galaxy is up, the container is stopped effectiveStatussleeping
StateThe galaxy is up, the container is up, routing is active, the public address has a tunnel effectiveStatusrunning
StateThe galaxy is up, the container is up, routing is active, the public address has no tunnel effectiveStatusunreachable
StateThe galaxy is up, the container is up, routing is stopped effectiveStatusunreachable
StateThe galaxy is in error or lost its connection to the platform effectiveStatusunreachable
StateThe check could not be made effectiveStatusunknown

The public entrance is checked separately. The container and the routing are measured on the galaxy itself, while the last leg of the path to https://app-XXXX.vibecode.bitrix24.com is the app's tunnel at the gateway, which is invisible from the galaxy: a started routing unit means it was started, not that it reached the gateway. So an app with a live container and active routing but no tunnel answers unreachable rather than running — that address serves nothing from outside. When the gateway's state could not be read, publicEntry is unknown and the verdict stays as it was: "could not look" is not "nothing works".

Important: the platform runs the live host check only while the galaxy is up and connected to the platform. Reading state never wakes a sleeping galaxy, so for a sleeping galaxy container and forwarder are always unknown and probe is host-down. The platform keeps the check result for a few seconds and serves it from memory: a check occupies the command channel shared by every app of the galaxy, so, thanks to this cache, frequent state polling does not tie it up.

How to bring a sleeping app up

Way What it does
WayPOST /v1/infra/servers/:id/wake What it doesBrings the app up through its host. Boots the galaxy when needed, then starts the container
WayPOST /v1/infra/servers/:id/start What it doesThe same thing: for an app, the two calls are equivalent
WayCode upload What it doesBoots the galaxy itself and leaves the app running
WayA request to the app's address What it doesIf waking is allowed, a request through the gateway brings the app up and answers with the BH_SERVER_WAKING code and a Retry-After header until it is ready — details in Authorization in a Black Hole app
WayBitrix24 event delivery What it doesThe platform brings the app up before delivering the event

The wake call returns immediately, not when the app is ready: an app has no cloud machine of its own, and the ?wait=true parameter does not make the call wait here. Check readiness by polling GET /v1/infra/servers/:id and reading reachability.effectiveStatus — the value waking means the galaxy is still booting.

How long to wait: the platform waits up to 15 minutes for a cold galaxy to come up, and expects the caller to wait as long. The exact budget is returned in the recovery.coldBootBudgetSeconds field when you read the logs of a sleeping app. An app on a galaxy that is already up starts in seconds.

A wake ban on the host blocks both calls, and /start does not lift it. The refusal codes are in the lifecycle table on the Galaxy app page.

When the app address has no tunnel, a confirmed wake ban is handled separately. Only in PUBLIC mode does the Gateway return 409 BH_APP_UNAVAILABLE without Retry-After: browsers show "App temporarily unavailable" and a "Refresh" button, while machine clients get JSON. The reason for the ban, balance information and platform brand are not disclosed, and neither waking nor automatic polling starts. An already open waiting page switches to this screen on its next poll. Once the ban is lifted, open the app again manually. In private mode, an identified user still receives 402 BH_WAKE_BLOCKED.

Logs of a sleeping app

Reading GET /v1/infra/servers/:id/logs wakes neither the app nor the galaxy. While the galaxy is asleep or unreachable, the response arrives with status 200, an empty data.logs array and two diagnostic fields.

JSON
{
  "success": true,
  "data": {
    "logs": [],
    "lines": [],
    "hint": "Galaxy host is asleep or unreachable, so the container log cannot be read right now. …",
    "recovery": {
      "reason": "The galaxy host carrying this container is not RUNNING + CONNECTED. …",
      "recoveryAction": "POST /v1/infra/servers/e22bb297-8a0a-4597-9b42-47d059cd1090/wake",
      "logsPreserved": true,
      "coldBootBudgetSeconds": 900,
      "poll": "GET /v1/infra/servers/e22bb297-8a0a-4597-9b42-47d059cd1090 (read `reachability`)",
      "wakeSchedule": { "available": true, "code": null }
    }
  }
}
Field Description
Fieldhint DescriptionExplains the reason in plain text. An action address appears only when this caller can use it. A missing host is identified explicitly.
Fieldrecovery.reason DescriptionWhy the log cannot be read now.
Fieldrecovery.reasonCode DescriptionGALAXY_HOST_NOT_FOUND when the linked host is missing, deleted, or unrelated to this app. For an app state that permits waking, a terminal host failure yields GUEST_NOT_BOOTING or GUEST_NO_EGRESS before the check for a deployment that has not started. RUNNING still yields SERVER_WRONG_STATE; caller gates precede host failures. Otherwise the field may be absent.
Fieldrecovery.recoveryAction DescriptionConditional wake address. It is absent when the caller is refused, the app state does not allow waking (including RUNNING and PROVISIONING before deployment starts), the host blocks waking, has a terminal boot or network failure, or the linked host is missing. A SLEEPING app with an address enters the wake path even without a deployment marker. Its presence describes the GET snapshot; state may change before POST.
Fieldrecovery.logsPreserved DescriptionConditional field. true means earlier lines survive waking the same container. When the host is missing or has GUEST_NOT_BOOTING, the field is absent because preservation is unknown. Before replacing such a host, contact support about recovering the existing logs.
Fieldrecovery.coldBootBudgetSeconds DescriptionCold boot budget in seconds; absent when the host is missing or requires recreation due to GUEST_NOT_BOOTING.
Fieldrecovery.poll DescriptionWhat to check readiness with instead of reading the log again. The field is conditional — it may be absent. It is omitted when GET /v1/infra/servers/{id} refuses the caller itself: an agent maintenance key does not carry that route in its allowlist, and for an owner whose account deletion is pending it sits in the frozen surface, unlike this log read. If the field is absent, just read the log again later — the hint says the same
Fieldrecovery.deliveryWakesHost DescriptionConditional paid path: action deploys code and cost describes its price. It appears only when the app is sleeping or already deploying, the host exists and does not block waking, and this caller can deploy while direct waking is refused. It is absent for RUNNING, PROVISIONING before deployment starts, and a missing host, including for a READONLY key. It is also absent on a terminal host failure. When the host blocks waking, the field is absent too: a deploy does NOT bring such a sleeping host up, it answers 502 GALAXY_HOST_UNREACHABLE.
Fieldrecovery.wakeSchedule DescriptionAn independent verdict on whether this caller may create a recurring wake window (available, and code on refusal). Losing recoveryAction due to app state or a missing host does not itself change this verdict. Permission to create a window does not promise a missing or blocked host will wake.

When recoveryAction is present, call it, wait for reachability.effectiveStatus=running, then read the log again. Otherwise follow reason and hint; for reasonCode=GALAXY_HOST_NOT_FOUND, check the app status or contact support.

If recoveryAction is absent, read reason and hint: the caller, app state, host policy, or missing linked host can be the cause. A RUNNING app gets 422 SERVER_WRONG_STATE from wake; PROVISIONING before deployment starts offers no wake action either. When the host exists but is unreachable, the answer states its condition. With GUEST_NOT_BOOTING, the host requires recreation: log preservation is unknown, and logsPreserved and the cold boot budget are absent regardless of the app status and refusal code priority. Before replacing the host, contact support about recovering the existing logs. For other causes of unreachability, the budget is retained; if waking is blocked, hint tells the owner how to lift the block. With a missing host, GET remains HTTP 200 with empty logs and recovery.reasonCode=GALAXY_HOST_NOT_FOUND, without a log preservation promise.

Some callers do have a way out, and it is not a wake. A key in read-only mode is allowed to deploy to a server it owns, and a deploy to a sleeping galaxy app can bring the host up when waking is not blocked on the host. The same path is open to two more callers who are refused the wake: an owner whose account deletion is pending (the freeze sits on the /v1/infra plugin, while delivery lives in another one) and a caller admitted through the application link (delivery checks ownership more loosely than the wake). Three caller restrictions rule out this path: a Cowork key, an agent maintenance key, or an account with the galaxy pilot switched off. A host that blocks waking also rules out this path for every caller. When that path is open the platform exposes it in machine-readable form — the recovery.deliveryWakesHost field (action is the call, cost states its price in words) — and the price is not a formality: it is a code deployment and it spends the Vibecode balance, not a wake. Do not call it just to read a log.

The paid path is not open to everyone. Check for deliveryWakesHost instead of inferring access from key mode. The field is absent when app state is unsuitable, the linked host is missing, or the host itself blocks waking — a deploy does not bring such a host up. If present, read cost: deployment spends balance and can meet a new refusal if state changes.

Recurring wake window

A wake window brings the app up on a schedule, without a manual call. It is not available to every app, so check this against the platform's answer rather than a general rule: the recovery.wakeSchedule field in the response to a log read of a sleeping app gives a direct answer for that particular app and, on a refusal, the refusal code.

Window eligibility is independent of recoveryAction: for a RUNNING app or missing host, the field may still say a caller can create a window even though waking cannot work now. Read recovery.wakeSchedule directly; creation eligibility does not promise execution.

An app in a galaxy never gets the ALWAYS_ON_CONFLICT refusal: it does not choose its plan but inherits it from the galaxy, and the platform does not treat it as running in always-on mode. This also covers agents and bots: they have no idle timer of their own, but a wake window is available to them on the usual terms. The window's other refusals still apply — for example, WAKE_SCHEDULE_GALAXY_DISABLED when the capability for Galaxy apps is switched off on the platform.

Listing, creating, updating and deleting windows — Scheduled wake.

See also