Skip to content

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

@pdenissen

Description

@pdenissen

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.

Metadata

Metadata

Assignees

Labels

Issue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is not validGate 1 Failed. Automatic verification of issue format is failedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions