Repository navigation
fix(memory): restart Chromium when over the memory budget - #43
Merged
Merged
Conversation
Closing the newest capture never handed memory back: a long-lived Chromium stayed over budget for days until the container was OOM-killed.
Code review
The memory guard now restarts shared Chromium when container memory exceeds the configured budget, causing in-flight screenshot and report captures to fail with 507. Route cleanup tolerates browser shutdown, and the README and recovery test describe and check the restart behavior. Latest changes: The newest commits update the README to describe Chromium restarts and add a recovery-test assertion for the relaunch log. Walkthrough (5)
Fixed since the last review (2)
Reviewed the commits since Tip Comment |
Docker Image Stats
Screenshot benchmark: Average of 3 runs on https://appwrite.io |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 changed
Closing pages did not free memory: on fra1 a pod logged "Memory budget exceeded" 1,770 times over a week at ~1.75 of 2 GiB before it was OOM-killed.
Tested
bun run lint,bun run check,bun run type-checkbun test tests/unitbun test tests/recoveryagainst a locally builtappwrite/browser:local