Skip to content

fix(self-hosting): add missing worker-executions service to compose generator#3055

Open
scottgrobinson wants to merge 1 commit into
appwrite:mainfrom
scottgrobinson:fix/compose-add-worker-executions
Open

fix(self-hosting): add missing worker-executions service to compose generator#3055
scottgrobinson wants to merge 1 commit into
appwrite:mainfrom
scottgrobinson:fix/compose-add-worker-executions

Conversation

@scottgrobinson

@scottgrobinson scottgrobinson commented Jun 17, 2026

Copy link
Copy Markdown

What does this PR do?

Adds the missing appwrite-worker-executions service to the self-hosting Docker Compose generator.

In Appwrite 1.9.0, execution persistence moved out of the functions worker into a dedicated executions worker (entrypoint worker-executions, Appwrite\Platform\Workers\Executions) that consumes the v1-executions queue and upserts the execution document. The generated compose only includes the schedule-executions scheduler — there is no worker-executions service — so nothing drains v1-executions. As a result, on self-hosted installs:

  • Scheduled executions are never recorded.
  • Async executions get stuck in status: waiting forever.
  • Synchronous executions work (the API persists them inline), which masks the issue.

The queue silently accumulates (observed ~46k stranded jobs on an affected instance). Adding the worker drains the backlog immediately and executions persist as completed.

Test Plan

On a self-hosted 1.9.0 install with the added service:

  • docker compose up -d appwrite-worker-executions
  • The v1-executions queue drains to 0 and scheduled/async executions appear in the Console with status completed.

Related PRs and Issues

Fixes #3056

The same omission exists in the main appwrite/appwrite compose template (app/views/install/compose.phtml); a corresponding change there is likely needed too.

…enerator

Appwrite 1.9.0 moved execution persistence to a dedicated executions
worker (entrypoint `worker-executions`) that consumes the `v1-executions`
queue. The generated docker-compose only includes the
`schedule-executions` scheduler, so nothing drains `v1-executions` and
scheduled/async function executions are never written to the database
(sync executions work because the API persists them inline).

Add the `appwrite-worker-executions` service so self-hosted installs
record executions correctly.

Fixes appwrite#3054

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

  • Adds the missing appwrite-worker-executions service to the self-hosting Docker Compose generator.
  • Wires the new worker to Redis, the configured database service, the Appwrite network, and core worker/logging environment variables.
  • Uses the worker-executions entrypoint so generated self-hosted compose files can drain the v1-executions queue.

Confidence Score: 4/5

The change is narrowly scoped, but the generated worker needs environment parity before it is safe for varied self-hosted configurations.

The affected file and service block are small and the missing configuration is concrete; targeted execution confirmed the generated service omits the expected worker configuration variables.

src/lib/components/compose-generator/composeData.ts

T-Rex T-Rex Logs

What T-Rex did

  • Ran a targeted Node repro script against the compose generator template to verify appwrite-worker-executions parity; the generated environment list omitted _APP_WORKERS_NUM=1, _APP_WORKER_MAX_COROUTINES=8, _APP_POOL_ADAPTER, and _APP_DATABASE_SHARED_TABLES, and the parity check against the upstream Appwrite 1.9.x contract failed on four variable assertions.
  • Compared the base and head generated compose configurations; the baseline reported has appwrite-worker-executions service=false and has entrypoint worker-executions=false, whereas the head reports them as true and shows redis and mongodb in depends_on.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "fix(self-hosting): add missing worker-ex..." | Re-trigger Greptile

Comment thread src/lib/components/compose-generator/composeData.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: self-hosting compose generator missing worker-executions service (1.9.0)

1 participant