Repository navigation
fix(limits): refuse an automatic PHP memory ceiling at or under the site's own value - #210
Merged
Merged
Conversation
…ite's own value With the automation on, a ceiling <= the operator's own memory_limit (e.g. 1024 MB with the default 512 ceiling) gives it nothing to raise to: every out-of-memory ends as a daily "stuck at the ceiling" alert and the limit never moves. The card accepted that pair silently. - post_set_limits refuses the save before anything is written. The floor is decided the way set_limits decides it (floor_after_save): resubmitting the stored, auto-raised value keeps the existing base, so lowering the ceiling under a raised value still works. - The limits card shows a warning for a stored bad pair and keeps it live while memory, ceiling or the checkbox are edited. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Follow-up to #208 (automatic PHP
memory_limit).post_set_limitsrefuses a save with the automation on when the ceiling is<=the site's own PHP memory. Nothing is written (limits, switch, ceiling) on refusal.hyperion_types::phpmem:floor_after_save,ceiling_leaves_no_room(+ tests, incl. the reported 1024/512 case and adecide()cross-check).Why
Real config: memory 1024 MB, automation on, default ceiling 512.
decide()turns every OOM intoCapped— no raise ever, just a daily "still runs out at its ceiling" alert. The card accepted it silently, and the label reads like "add up to 512 MB".Reviewer notes
set_limits: resubmitting the stored (auto-raised) value keeps the state'sbase_mb; a newly typed value becomes the floor. So lowering the ceiling under a raised value (whichdecide()handles by pulling the limit down) is still allowed.php.mem_auto_statefrom the OWNING node (HostingGetLimits,HostingKvList).find_hosting_anywheremoved before the limits dispatch (was after) since the check needs the id.limit × max_children ≤ ¾ RAM) is not validated — the web side doesn't know node RAM.Testing
cargo test -p hyperion-types phpmem(14 pass),cargo test -p hyperion-web(incl. template_lint) green.🤖 Generated with Claude Code