Repository navigation
Closed
Closed
Copy link
Labels
product / consoleConsole, UI and UX issuesproduct / databasesFixes and upgrades for the Appwrite Database.product / domainsFixes and upgrades for the Appwrite Domains.product / messagingFixes and upgrades for the Appwrite Messaging.product / sitesFixes and upgrades for Appwrite Sites.
Description
Tracks PR #14477.
Plan
- Goal: Stop queue messages from carrying whole project and user documents (and the full audit response payload), so a single oversized job can't OOMKill workers again. Per the PR, on 2026-10-13 a ~138MB
v1-auditsjob sat in the queue for 14h and OOMKilled everyworker-auditspod that reserved it (~360 restarts). - What changes (all in fix(queue): ship lean project and user contexts instead of whole documents #14477):
- New
src/Appwrite/Event/Message/UserContext.php($id,$sequence,name,email,type);ProjectContext.phpgainsdatabase. - Messages under
src/Appwrite/Event/Message/(Build, Func, Mail, Messaging, Database, Delete, Jobs, Migration, Execution(s), ExecutionCancelled, StatsResources, Audit) sendProjectContext/UserContextinstead of full documents; Database and Messaging dropuserentirely. app/controllers/shared/api.phpandsrc/Appwrite/Platform/Modules/S3/Http/S3/Base.php: auditpayloaddefaults off / sends[].app/init/worker/message.php: workers resolve the console project from config, not the payload.- New
src/Appwrite/Utopia/Queue/Publisher/Telemetry.php:queue.payload.sizehistogram per queue, warning above 1MB (no rejection). - Unit tests in
tests/unit/Event/Message/and a pinned domain intests/unit/Workers/CertificatesDomainValidationTest.php. - PR benchmark: document-carrying queues drop from ~147 GiB/day to ~22 GiB/day (85%); old-format in-flight jobs still decode.
- New
- Remaining steps:
- Get fix(queue): ship lean project and user contexts instead of whole documents #14477 reviewed and merged, watching the E2E suites the PR lists (Functions, Webhooks, Databases/TablesDB, Messaging, Account, Teams, Migrations, Projects, Realtime, Usage).
- Ship the cloud follow-up in appwrite-labs/cloud together with the
server-cebump, as the PR says it must: dropuser:fromDatabaseMessagein the fourDelete.phpactions, return the injected console project in cloud's workermessage.php, wrap cloud publishers with the size decorator, and trim cloud messages (threats, growth, ZDT, dedicated databases). - Release and deploy, then watch the
queue.payload.sizemetric andworker-auditsrestarts.
- Done when:
- fix(queue): ship lean project and user contexts instead of whole documents #14477 merged
- Cloud follow-up merged with the bump and deployed
- No more >1MB payload warnings from document-carrying queues and no
worker-auditsOOMKills
Update 2026-10-14
- Also tracks consumer-side size signal in #14480:
Message::getSize()/setSize(),messaging.process.message.sizehistogram inpackages/queue/src/Server.php, and pre-decodeerror_logover 1MB in Redis/NATS brokers (Message.php,Broker/Redis.php,Broker/Nats.php). Complements the publisherqueue.payload.sizework in fix(queue): ship lean project and user contexts instead of whole documents #14477; does not close this issue alone.
Metadata
Metadata
Assignees
Labels
product / consoleConsole, UI and UX issuesproduct / databasesFixes and upgrades for the Appwrite Database.product / domainsFixes and upgrades for the Appwrite Domains.product / messagingFixes and upgrades for the Appwrite Messaging.product / sitesFixes and upgrades for Appwrite Sites.
Activity