You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(executor): bump to 1.1.2 so restarts stop leaving crash-looping runtimes - #14361
Bump openruntimes/executor from 0.29.0 to 1.1.2 in docker-compose.yml. The installer builds new installs and upgrades from this file. The console's composeData.ts is regenerated from it at release time.
Why
Self-hosted users see function containers restart forever, logging:
[19:22:33] [open-runtimes] Code path /tmp/code.tar.gz not found.
[19:22:33] [open-runtimes] Code path /tmp/code.tar.gz not found.
[19:22:34] [open-runtimes] Code path /tmp/code.tar.gz not found.
...
Appwrite creates runtimes with restartPolicy: 'always' (src/Executor/Executor.php). When the executor restarts, it loses track of its runtimes, but they keep running. The next maintenance tick deletes their code directories (/tmp/exc1-<project>-<deployment>/src, mounted as the runtime's /tmp). When such a runtime next exits (a crash, an OOM kill, a Docker restart or a reboot), Docker restarts it into an empty /tmp and it loops forever.
open-runtimes/executor#262 (released in 1.1.2) removes untracked runtimes when the executor starts, before maintenance can touch them. The full analysis and an e2e regression test are in that PR.
On a local 2.4.0 stack, this is how I reproduced the issue with 0.29.0:
Execute a node-22 function.
docker restart exc1.
The next tick logs [Maintenance] Removed /tmp/exc1-repro-… while the runtime is still up.
Crash the runtime: it loops on Code path /tmp/code.tar.gz not found, with RestartCount=9 after 50s.
With 1.1.2, on the same stack:
Execute the function: 200 hello.
docker restart exc1: the executor logs [Maintenance] Removed 1/1 orphaned runtimes. before Executor is ready., and the runtime container is gone.
Execute again: it cold-starts and returns 200 hello, with code.tar.gz back in place.
There's no Appwrite test here. The regression test lives in the executor, where the behaviour is: testRestartRemovesOrphanedRuntimes fails on 0.29.0 and passes on 1.1.2.
🟢 Update generated compose executor pin to 1.1.2 (docker-compose.yml:1744) — The PR bumps the executor image to openruntimes/executor:1.1.2 in docker-compose.yml:1744, but the console's compose generator still emits the old pin openruntimes/executor:0.29.0 from its hardcoded block in apps/console/src/lib/docs/compose-generator/composeData.ts:182.
This change updates the self-hosted compose file to ship the new openruntimes/executor release, raising the executor pin to the 1.x line alongside the matching environment and healthcheck wiring that already exists in docker-compose.yml. The rest of the diff is limited to that single pin.
Files
Change
docker-compose.yml
Bumps the openruntimes-executor service image to openruntimes/executor:1.1.2.
apps/console (untouched)
The console compose generator still emits the old 0.29.0 pin, so generated installs now diverge from the shipped compose file (see inline finding).
The executor bump is compatible with the Appwrite calls and configuration present here, and no defects were found.
Updates the openruntimes-executor image used by the Compose stack from 0.29.0 to 1.1.2. This lets new installs and upgrades use the executor release that removes orphaned runtimes on startup.
Verdict
New comments
Fixed
Still open
✅ Approved
0
0
0
📂 Walkthrough · 1
File
Change
docker-compose.yml
Bumps the Open Runtimes executor image to 1.1.2.
Reviewed 9735cf0 · Details · Comment @hansi-codes review to re-run, or mention @hansi-codes with a question.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Bump
openruntimes/executorfrom0.29.0to1.1.2indocker-compose.yml. The installer builds new installs and upgrades from this file. The console'scomposeData.tsis regenerated from it at release time.Why
Self-hosted users see function containers restart forever, logging:
Appwrite creates runtimes with
restartPolicy: 'always'(src/Executor/Executor.php). When the executor restarts, it loses track of its runtimes, but they keep running. The next maintenance tick deletes their code directories (/tmp/exc1-<project>-<deployment>/src, mounted as the runtime's/tmp). When such a runtime next exits (a crash, an OOM kill, a Docker restart or a reboot), Docker restarts it into an empty/tmpand it loops forever.open-runtimes/executor#262 (released in 1.1.2) removes untracked runtimes when the executor starts, before maintenance can touch them. The full analysis and an e2e regression test are in that PR.
Changes between 0.29.0 and 1.1.2
POST /v1/runtimes/:runtimeId/commandsnow requires the executor secret. Appwrite already sendsauthorization: Bearer <_APP_EXECUTOR_SECRET>on every call, so nothing changes for us.Verification
On a local 2.4.0 stack, this is how I reproduced the issue with
0.29.0:docker restart exc1.[Maintenance] Removed /tmp/exc1-repro-…while the runtime is still up.Code path /tmp/code.tar.gz not found, withRestartCount=9after 50s.With
1.1.2, on the same stack:200 hello.docker restart exc1: the executor logs[Maintenance] Removed 1/1 orphaned runtimes.beforeExecutor is ready., and the runtime container is gone.200 hello, withcode.tar.gzback in place.There's no Appwrite test here. The regression test lives in the executor, where the behaviour is:
testRestartRemovesOrphanedRuntimesfails on 0.29.0 and passes on 1.1.2.Related: #14363