- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2019
01:39 AM
06-15-2019
01:39 AM
Hello.
I changed the memory_limit to 4096MB:
memory_limit = 4096MB
But when I run below command:
# ./magento setup:store-config:set --base-url="http://127.0.0.1:1338"
IT show me an error:
PHP Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 147456 bytes) in /var/www/html/vendor/magento/module-cms-graph-ql/registration.php on line 10
How can I solve it?
Solved! Go to Solution.
Labels:
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2019
03:12 AM
06-15-2019
03:12 AM
Can you try once using inline memory:
php -d memory_limit=-1 bin/magento
php -d memory_limit=-1 bin/magento
10 REPLIES 10
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2019
01:44 AM
06-15-2019
01:44 AM
Re: Allowed memory size of 2097152 bytes exhausted.
Hi ,
Add following line in index.php.
ini_set("memory_limit","-1");
If it will not work then you need to increase from the server and restart apache.
Or try command using installed php full path:
For example:
/usr/bin/php7.2 bin/magento
Please go through following url, it may help you.
https://magento.stackexchange.com/questions/167862/php-memory-limit
Add following line in index.php.
ini_set("memory_limit","-1");
If it will not work then you need to increase from the server and restart apache.
Or try command using installed php full path:
For example:
/usr/bin/php7.2 bin/magento
Please go through following url, it may help you.
https://magento.stackexchange.com/questions/167862/php-memory-limit
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2019
02:58 AM
06-15-2019
02:58 AM
Re: Allowed memory size of 2097152 bytes exhausted.
I changed physical memory to 6GB and added that line to "index.php" but problem not solved.
I did:
# /usr/bin/php72 magento setup:static-content:deploy -f PHP Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 147456 bytes) in /var/www/html/vendor/magento/module-cms-graph-ql/registration.php on line 10
Any idea to solve it?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2019
03:12 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2019
03:43 AM
06-15-2019
03:43 AM
Re: Allowed memory size of 2097152 bytes exhausted.
The result is:
# php -d memory_limit=-1 magento setup:static-content:deploy -f Deploy using quick strategy frontend/Magento/blank/en_US 2245/2245 ============================ 100% % 4 secs adminhtml/Magento/backend/en_US 2328/2328 ============================ 100% % 2 secs frontend/Magento/luma/en_US 2260/2260 ============================ 100% % 3 secs Execution time: 38.524020195007
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2019
03:48 AM
06-15-2019
03:48 AM
Re: Allowed memory size of 2097152 bytes exhausted.
It’s looks like static content deployment is completed without any error. 😊
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2019
05:28 PM
06-16-2019
05:28 PM
Re: Allowed memory size of 2097152 bytes exhausted.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2020
06:11 AM
11-13-2020
06:11 AM
Re: Allowed memory size of 2097152 bytes exhausted.
Add the next code to bin/magento just after the <?php tag:
ini_set("memory_limit","-1");
You're welcome
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2021
03:05 AM
03-04-2021
03:05 AM
Re: Allowed memory size of 2097152 bytes exhausted.
php -d memory_limit=-1 bin/magento sampledata:deploy php -d memory_limit=-1 bin/magento setup:upgrade
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2022
01:04 PM
08-10-2022
01:04 PM
Re: Allowed memory size of 2097152 bytes exhausted.
Hi,
This unfortunately did not work for me.
I am new to Magento 2 and I have followed the setup here on my local:
But after I run
bin/magento setup:install \ --base-url=http://localhost/magento2ee \ --db-host=localhost \ --db-name=magento2 \ --db-user=patrick \ --db-password=Password.2022 \ --admin-firstname=admin \ --admin-lastname=admin \ --admin-email=admin@admin.com \ --admin-user=admin \ --admin-password=admin123 \ --language=en_US \ --currency=USD \ --timezone=America/Chicago \ --use-rewrites=1 \ --search-engine=elasticsearch7 \ --elasticsearch-host=es-host.example.com \ --elasticsearch-port=9200 \ --elasticsearch-index-prefix=magento2 \ --elasticsearch-timeout=15
I get this error in the terminal:
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /Users/magento2/vendor/magento/module-config/Model/Config/Structure/Mapper/Path.php on line 49 Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /Users/magento2/vendor/magento/module-config/Model/Config/Structure/Mapper/Path.php on line 49 Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.% patricpatrpatricpapatrpatrpapapapapapapapapapapapapapapa
When I click into the file this is what the path.php file on line 49 this is what I see:
$elementConfig['path'] = $parentPath;
I would really appreciate the help!