Skip to content

fix(executor): bump to 1.1.2 so restarts stop leaving crash-looping runtimes - #14361

Merged
ChiragAgg5k merged 1 commit into
mainfrom
fix/executor-orphaned-runtimes
Oct 12, 2026
Merged

ChiragAgg5k merged 1 commit into
mainfrom
fix/executor-orphaned-runtimes

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

What

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.

 executor restarts ──▶ runtime orphaned (still running, untracked)
 maintenance tick  ──▶ deletes /tmp/exc1-…/src   (the orphan's code)
 runtime exits     ──▶ restart → "Code path /tmp/code.tar.gz not found" → exit → restart … ⟲

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

Verification

On a local 2.4.0 stack, this is how I reproduced the issue with 0.29.0:

  1. Execute a node-22 function.
  2. docker restart exc1.
  3. The next tick logs [Maintenance] Removed /tmp/exc1-repro-… while the runtime is still up.
  4. 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:

  1. Execute the function: 200 hello.
  2. docker restart exc1: the executor logs [Maintenance] Removed 1/1 orphaned runtimes. before Executor is ready., and the runtime container is gone.
  3. 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.

Related: #14363

@luxor-code-review

luxor-code-review Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review complete. No blocking issues — approved ✅; 1 nitpick below.

🧹 Nitpicks (1) — 🟢 1 low
  • 🟢 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).

Reviewed commit: 9735cf0

@ghost

ghost commented Oct 12, 2026

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

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.

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Tier S · Looks good to merge. Summary

@ChiragAgg5k
ChiragAgg5k merged commit ec0f60e into main Oct 12, 2026
19 checks passed
@ChiragAgg5k
ChiragAgg5k deleted the fix/executor-orphaned-runtimes branch October 12, 2026 11:17
@ChiragAgg5k ChiragAgg5k self-assigned this Oct 12, 2026
@github-actions

Copy link
Copy Markdown

Security rules

No new WARNING or ERROR findings from security rules.

32 existing findings tracked in .semgrep/baseline.json
  • php.appwrite.guest-write-without-abuse-limit (17)
  • php.appwrite.permissive-write-permission (8)
  • php.appwrite.secret-compare-timing (5)
  • php.appwrite.weak-secret-env-default (2)

Posted by Checks / Rules. Re-runs update this comment in place. Rule details and baseline: .semgrep/README.md.

@github-actions

Copy link
Copy Markdown

✨ Benchmark results

Comparing main (before) → fix/executor-orphaned-runtimes (after).

Metric Before After Change
🚀 Requests/sec 223.09 226.16 ⚪ +1.4%
⏱️ Latency P50 76.64 ms 77.02 ms ⚪ +0.5%
⏱️ Latency P95 185.78 ms 176.5 ms ⚪ -5%
Per-scenario breakdown & investigation details

Metrics below reflect the current branch (after). Δ P95 compares against the base.

Scenario P50 (ms) P95 (ms) Requests RPS Δ P95 (ms)
API total 77.02 176.5 14,022 226.16 -9.28
Account 151.06 269.3 738 12.29 -32.07
TablesDB 74.15 130.14 7,626 124.91 -6.05
Storage 72.13 149.49 3,690 62.64 -1.25
Functions 112.26 219.47 1,968 34.07 +3.49

Top API waits (after)

API request Max wait (ms)
account.name.update 452.03
account.prefs.update 430.8
functions.create 379.72
functions.variables.create 373.12
functions.variables.update 367.34

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.

1 participant