Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] Updated user.ini according to Magento DevDocs #11734

Merged

Conversation

lewisvoncken
Copy link
Contributor

Description

The Magento DevDocs recommend to set the memory_limit to 1G or at least 2G for debugging.
http://devdocs.magento.com/guides/v2.2/install-gde/trouble/php/tshoot_php-set.html

Fixed Issues (if relevant)

  1. User.ini files specify 768M - Docs recommend at least 1G #11322: User.ini files specify 768M - Docs recommend at least 1G

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@orlangur orlangur self-assigned this Oct 25, 2017
@orlangur
Copy link
Contributor

Minimum required memory limit can be found here: http://devdocs.magento.com/guides/v2.2/install-gde/prereq/php-settings.html
And here in the code: https://github.com/magento/magento2/blob/2.1/setup/src/Magento/Setup/Model/PhpReadinessCheck.php#L189

Troubleshooting doc is wrong about 1Gb.

Please always start your contributions from default repo branch, 2.2-develop. You can change target branch and create a new branch based on 2.2-develop in this PR.

According to my understanding all occurrences of 768M in code must be replaced with recommended 756M

@lewisvoncken
Copy link
Contributor Author

lewisvoncken commented Oct 25, 2017

@orlangur thank you for your feedback I immediately applied your feedback. Next time I will create a pull request first for the base branch

@orlangur
Copy link
Contributor

Great! Thanks for collaboration.

Let me clarify the thing regarding target branch. You need to create a clean branch based on freshest 2.2-develop and apply similar changes, then force push to the same branch you used to create PR and then change target branch via GitHub UI.

All occurrences may be found with Ctrl+Shift+F in PhpStorm or via grep in CLI. Besides changes you made there are also in .htaccess.sample, nginx.conf.sample.

Here we need to change condition also:

if ($memoryLimit != -1 && $this->getMemoryInBytes($memoryLimit) < 768 * 1024 * 1024) {
                @ini_set('memory_limit', '768M');
            }

Please make changes as a single clean commit. If you need any assistance with git to achieve what I described, just let me know.

@lewisvoncken lewisvoncken force-pushed the experius-2.1-patch-issue-11322 branch from b65e0c1 to 8e00d3d Compare October 25, 2017 17:43
@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Oct 25, 2017

CLA assistant check
All committers have signed the CLA.

@lewisvoncken lewisvoncken changed the base branch from 2.1-develop to 2.2-develop October 25, 2017 17:43
@lewisvoncken lewisvoncken force-pushed the experius-2.1-patch-issue-11322 branch from 8e00d3d to 973986c Compare October 25, 2017 17:45
@lewisvoncken
Copy link
Contributor Author

lewisvoncken commented Oct 25, 2017

@orlangur I think it is correct now. Thanks for the feedback and quick replies! If it is accepted I will also backport it to 2.1 and forward for 2.3

@orlangur
Copy link
Contributor

orlangur commented Oct 25, 2017

@lewisvoncken almost correct :) 768 * 1024 * 1024 here we need 756 too (please amend commit, as always). Besides that looks perfect to me 👍

@lewisvoncken lewisvoncken force-pushed the experius-2.1-patch-issue-11322 branch from 973986c to 45648e4 Compare October 25, 2017 18:05
@lewisvoncken
Copy link
Contributor Author

@orlangur I searched for 768M but I have updated it in the same commit to keep the pull request clean

@orlangur
Copy link
Contributor

Thanks, I mentioned this condition in "Here we need to change condition also:", remarked it accidentally.

@orlangur orlangur added this to the October 2017 milestone Oct 25, 2017
@magento-team magento-team merged commit 45648e4 into magento:2.2-develop Oct 26, 2017
magento-team pushed a commit that referenced this pull request Oct 26, 2017
[EngCom] Public Pull Requests - 2.2-develop
 - MAGETWO-82724 Allow coupon code with special charater to be applied to order in checkout #11710
 - MAGETWO-82675 Add a health check to the NGINX configuration sample #11690
 - MAGETWO-82562 Coupon codes not showing in invoice #11635
 - MAGETWO-82535 Fixed ability to set field config from layout xml #11302 [backport 2.2] #11643
 - MAGETWO-81146 Fixing #10275 keyboard submit of adminhtml suggest form. #11250
 - MAGETWO-82761 [Backport 2.2-develop] Dashboard Fix Y Axis for range #11751
 - MAGETWO-82748 Fix Notice: freePackageValue is undefined #11720
 - MAGETWO-82747 [TASK] Updated user.ini according to Magento DevDocs #11734
 - MAGETWO-82537 MAGETWO-81311: Check the length of the array before attempting to sli… #11637
 - MAGETWO-81970 Add missing translations in Magento_UI #11440
 - MAGETWO-81904 FIX #11022 in 2.2-develop: Filter Groups of search criteria parameter have not been included for further processing #11421
 - MAGETWO-82179 Fix Filter Customer Report Review 2.2-develop [Backport] #11522
@LilyBergonzatOld
Copy link

Just found out that Magento was recommending 756M as PHP memory limit. Can I ask you why is that? Why not 768? 756 isn't a power of 2, so it really seems weird.

@orlangur
Copy link
Contributor

@YannBergonzat,

Our detailed recommendations are:
Compiling code or deploying static assets, 756M
Installing and updating Magento components from Magento Marketplace, 2G
Testing, 2G

Looks like just an empirical number as to me. Probably was 256M and then increased until it was enough :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants