Repository navigation
fix: make the PHP memory limit configurable via _APP_MEMORY_LIMIT - #14454
Merged
HarshMN2345 merged 1 commit intoOct 15, 2026
Conversation
Signed-off-by: Jyotirmoy Roy <[email protected]>
🟢 Tier S · Ready to merge
This change adds
Note @ItsRoy69 does not have write access to this repository, so Hansi does not approve automatically. A maintainer can review and approve. 📂 Walkthrough · 4
Reviewed |
HarshMN2345
changed the base branch from
main
to
fix-configurable-memory-limit
October 15, 2026 07:23
HarshMN2345
merged commit Oct 15, 2026
56c9bef
into
appwrite:fix-configurable-memory-limit
1 check passed
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 does this PR do?
app/init.phpsetini_set('memory_limit', '512M')unconditionally on every process. Because a runtimeini_set()always wins overphp.iniandphp -d, operators could not raise the limit, and Realtime (which holds every WebSocketconnection in memory) was capped at 512M regardless of host RAM.
Changes:
app/init.php:ini_set('memory_limit', System::getEnv('_APP_MEMORY_LIMIT', '512M'))app/config/variables.php: define_APP_MEMORY_LIMIT(default512M, introduction2.4.0)docker-compose.yml: forward_APP_MEMORY_LIMITin all PHP services.env: add the defaultTest Plan
app/init.php: HEAD with_APP_MEMORY_LIMIT=2Gyieldsmemory_limit=512M(bug reproduced); patched yields2G; unset yields512M-1yields-1.docker compose --profile separate config: all 26 Appwrite PHP services resolve_APP_MEMORY_LIMIT=512M; exporting_APP_MEMORY_LIMIT=2Gpropagates toappwriteandappwrite-realtime.bin/releaseguard (compose vars vs variables.php, introduction ==APP_VERSION_STABLE): PASS.vendor/bin/pinton the changed files: pass. PHPStan on the changed files: no errors.phpunit tests/unit/Generalconfig tests andtests/unit/Docker(25/25, incl.Compose\GeneratorTestparsing the root compose): pass.Related PRs and Issues
Checklist