Open
Conversation
|
| ℹ️ Name | 🔗 Infos & links |
|---|---|
| 🌱 Deploying commit | 3fe1c5f |
| 👁️ Preview | Generating preview app... |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the PHP application documentation to better explain how PHP-FPM worker memory limits are derived from available instance memory, and how configuration can affect the effective limit.
Changes:
- Clarifies that worker limits depend on application available memory (RAM minus system overhead) and renames the table column to “Default Memory Limit”.
- Expands
MEMORY_LIMITexplanation with an upper bound based on available memory and a Nano example. - Notes that
CC_CONFIGURATION_PM_MAX_CHILDRENinfluences the effective per-worker memory limit.
You can also share your feedback on Copilot code review. Take the survey.
| To change this limit you can define `MEMORY_LIMIT` [environment variable](/doc/reference/reference-environment-variables#php). | ||
|
|
||
| If you define a limit exceeding the application memory it will use the default one. | ||
| When php-fpm spawns a worker it allocates a smaller part of the application's available memory to the worker. The available memory is the instance's total RAM minus system overhead (monitoring, logging and kernel). Here are the default values for each flavor: |
Comment on lines
+145
to
+147
| To change this limit, define the `MEMORY_LIMIT` [environment variable](/doc/reference/reference-environment-variables#php) (in MB, as an integer). | ||
|
|
||
| The maximum allowed value is the application's available memory, which is lower than the instance's total RAM due to system overhead. For example, a Nano instance has 512 MB of total RAM, but only around 416 MB are available to your application. If you set `MEMORY_LIMIT` higher than the available memory, the default value is used instead and a warning is logged. Setting `max_children` through `CC_CONFIGURATION_PM_MAX_CHILDREN` also affects the effective memory limit, as the system adjusts it to ensure all workers can fit in the available memory. |
|
|
||
| To change this limit, define the `MEMORY_LIMIT` [environment variable](/doc/reference/reference-environment-variables#php) (in MB, as an integer). | ||
|
|
||
| The maximum allowed value is the application's available memory, which is lower than the instance's total RAM due to system overhead. For example, a Nano instance has 512 MB of total RAM, but only around 416 MB are available to your application. If you set `MEMORY_LIMIT` higher than the available memory, the default value is used instead and a warning is logged. Setting `max_children` through `CC_CONFIGURATION_PM_MAX_CHILDREN` also affects the effective memory limit, as the system adjusts it to ensure all workers can fit in the available memory. |
|
| ℹ️ Name | 🔗 Infos & links |
|---|---|
| 🌱 Deploying commit | 3fe1c5f |
| 👁️ Preview | Generating preview app... |
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?
This pull request updates the PHP application documentation to clarify how memory limits are set and enforced for php-fpm workers. The changes provide more precise explanations about available memory, default values, and the impact of environment variables and configuration options.
Documentation improvements:
MEMORY_LIMITenvironment variable, specifying that it should be set in MB as an integer, and clarified that the maximum allowed value is the available application memory. Added an example for the Nano instance and described what happens if the limit is exceeded, including logging behavior.max_childrenviaCC_CONFIGURATION_PM_MAX_CHILDRENalso affects the effective memory limit, as the system ensures all workers fit within available memory.🔗 Related Issue (if applicable)
🧪 Type of Change
✅ Quick Checklist
👥 Reviewers
@PLhuillery