Problem type

Service is draining

HTTP 421 ยท server_draining

What it means

The API answers with HTTP 421 Misdirected Request and the application/problem+json document below when the condition is Service is draining. The document's type member is https://screenrig.ai/problems/server-draining, the address of this page, and its code member is server_draining.

What to do

This host is shutting down. Retry the same request shortly; it will reach a host that is serving.

Should you retry?

The registry gives this problem the retry_backoff action: retry the same request on the backoff schedule, never sooner than Retry-After.

Example response

Most routes answer with the error in the first entry of errors, and the document members instance and request_id beside it. The type, code, title and status of this problem type are fixed; detail varies per request, and hint is the registry default unless the handler sets a more specific one.

http
HTTP/1.1 421 Misdirected Request
Content-Type: application/problem+json

{
  "errors": [
    {
      "status": 421,
      "code": "server_draining",
      "type": "https://screenrig.ai/problems/server-draining",
      "title": "Service is draining",
      "detail": "What went wrong in this request.",
      "hint": "This host is shutting down. Retry the same request shortly; it will reach a host that is serving."
    }
  ],
  "instance": "INSTANCE",
  "request_id": "REQUEST_ID",
  "server_time": "2026-01-01T00:00:00Z",
  "action": "retry_backoff"
}

Player-facing routes (the screen and media routes, the pairing streams and the probe routes) answer with the same members flat at the top level:

http
HTTP/1.1 421 Misdirected Request
Content-Type: application/problem+json

{
  "type": "https://screenrig.ai/problems/server-draining",
  "title": "Service is draining",
  "status": 421,
  "detail": "What went wrong in this request.",
  "instance": "INSTANCE",
  "code": "server_draining",
  "request_id": "REQUEST_ID",
  "action": "retry_backoff",
  "server_time": "2026-01-01T00:00:00Z",
  "errors": [],
  "hint": "This host is shutting down. Retry the same request shortly; it will reach a host that is serving."
}

In the API contract

The OpenAPI contract describes this problem in these words:

Serving readiness. A draining host answers 421 server_draining with Retry-After: 1. A required dependency failure answers 500 not_ready with Retry-After. A live database schema that does not satisfy this release (a desired index missing or different for more than two minutes) answers 500 schema_incompatible without Retry-After: it does not clear by waiting.

Operations that name this problem

These operations name this problem in the API reference:

Player action

The Player action class is retry_backoff: Retry the same request on the backoff schedule, never sooner than Retry-After.

Reference

Codeserver_draining
HTTP status421 Misdirected Request
Typehttps://screenrig.ai/problems/server-draining
Player actionretry_backoff