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

Magento 2 runs out of memory when removing secure base_url in database. #12835

Closed
pdenissen opened this issue Dec 20, 2017 · 2 comments
Closed
Assignees
Labels
Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@pdenissen
Copy link

pdenissen commented Dec 20, 2017

Preconditions

Magento 2.2.1
Runs on MacOS 10.13.2
PHP7.0.2
10.2.7-MariaDB
NGINX 1.12.1

Steps to reproduce

  1. Fill both fields, secure and unsecure base URL, with something like http://environment.local/ in the CMS configuration.
  2. Go to http://environment.local in your browser. Website should work now.
  3. Open core_config_data with a database editor and search for the path web/secure/base_url
  4. Replace the value http://environment.local/ with NULL.
  5. Flush cache with bin/magento cache:flush in your terminal.
  6. Open http://environment.local in your browser again (or refresh).
  7. You should see a fatal error like: Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 262144 bytes) in app/code/Magento/Store/Model/Config/Placeholder.php on line 99

Expected result

  1. Working website when go to http://environment.local

How to solve

Find web/secure/base_url in table core_config_data and copy the value from web/unsecure/base_url here.

Magento should not run out of memory because of a missing value I guess.

@magento-engcom-team magento-engcom-team added Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Dec 20, 2017
@magento-engcom-team
Copy link
Contributor

@Hobbit78, thank you for your report.
We've created internal ticket(s) MAGETWO-85920 to track progress on the issue.

@p-bystritsky p-bystritsky self-assigned this Dec 22, 2017
@p-bystritsky
Copy link
Contributor

p-bystritsky commented Dec 29, 2017

I think it's not a bug. You are directly adding the incorrect value to core_config_data. Magento cannot parse it, and it causes an infinite recursion. If you want to remove some value from core_config_data, you should delete the whole record, not only it's "value" raw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

3 participants