Hot answers tagged

98 votes
Accepted

Magento 2 Allowed Memory exhausted error when compile code

A quick solution for memory limit in Magento 2 command is directly adding memory limit inside command. For Compilation command, php -dmemory_limit=5G bin/magento setup:di:compile For Deployment ...
user avatar
55 votes
Accepted

Fatal error "Allowed memory size" while run setup:static-content:deploy

quick solution add memory size in the command : php -dmemory_limit=6G bin/magento setup:static-content:deploy change 6G to what you want
user avatar
  • 1,801
19 votes
Accepted

PHP Fatal error: Allowed memory size of on indexer.php action

The problem comes from .htaccess. One of the values is php_value memory_limit 256M. This doesn't make sense on the first view, but on the second it is explainable. I don't know why magento ...
user avatar
14 votes

Magento2 System Requirements PHP Memory Limit

The official system requirements (or rather: recommendations) are: Increase the PHP memory limit to at least 768MB for normal operation or 2GB for testing. Source: Recommendations for CentOS and ...
user avatar
14 votes

Magento 2 Allowed Memory exhausted error when compile code

use this 'dirty' way php -dmemory_limit=-1 bin/magento setup:di:compile
user avatar
  • 802
12 votes
Accepted

No Inode space!; How to delete Magento sessions folder's contents?

I wouldn't delete all sessions, start with the older ones first. Since the quote is valid for 30 days you could try going with that. In your var/session folder. find . -mtime +30 -exec rm {} \; This ...
user avatar
  • 37.4k
10 votes
Accepted

Magento 2.x PHP memory_limit requirements

As the documentation snippet you found explains, 2G is the memory limit to cover all possible use cases. Some operations (particularly command-line operations like setup, testing, and compilation) can ...
user avatar
8 votes

Memory limit when uploading product image

There is a known bug in the GD library of Magento CE 1.x where it can't handle memory limits other than in KB or MB. To solve the issue and assign higher memory limits (GB), you will need to make the ...
user avatar
8 votes

Magento 2 Allowed Memory exhausted error when compile code

Looks like your cli has only 128MB of memory allocated. Increase the value to at least 256MB or 512MB if you can.
user avatar
  • 196k
7 votes

Magento 2 Allowed Memory exhausted error when compile code

php -dmemory_limit=6G bin/magento setup:di:compile
user avatar
5 votes

Fatal error memory exhausted Zend Pdo

You can add the following in index.php - make sure the log file path is correct function shutdownCapture() { global $lastQueryString; $error = error_get_last(); if ($error !== null &&...
user avatar
  • 5,332
5 votes

Sample data for Magento 2 - PHP memory problem while installing from Composer

We apologize for the issues. There have been recent problems with sample data that are now resolved. We just published updates to the procedure. There are two ways to do it: Install sample data ...
user avatar
5 votes

Magento 2 Allowed Memory exhausted error when compile code

If you are using PHP >= 5.3.0 and you used the Magento 2.1.x and above, then after you run composer install, two files will be created in your root directory and your pub directory named .user.ini ...
user avatar
  • 2,869
5 votes

Magento2 : How To Solve Out Of Memory Limit Error While Using Composer Update Command

Try full path to composer whereis composer Once you know path php -d memory_limit=4G /opt/cpanel/composer/bin/composer update -vvv
user avatar
4 votes
Accepted

Memory limit when uploading product image

You can try to increase de memory limit of your php: Open /etc/php5/apache2/php.ini in a text editor Change memory_limit to: memory_limit = 256M And you can check creating a file info.php <?...
user avatar
  • 1,600
4 votes

Sample data for Magento 2 - PHP memory problem while installing from Composer

I get the same issue. Plus, the download via composer of the sample data takes 2 eternities until it crashes. Here is what I did. Download the sample data from here and unzip what you donwload in dev/...
user avatar
  • 196k
4 votes
Accepted

Magento 2 run setup:di:compile command on a shared hosting with limited memory_limit (max 512M)

Increase the memory limit to update .php.ini file If you have access to your php.ini file or can create one in the root, you can globally increase your allocated memory. ;adjust memory limit ...
user avatar
  • 1,450
3 votes
Accepted

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried > to allocate 4194304 bytes)

It looks to me based on what you state at the start (run reindex all) that you are currently using the command line shell/index.php to do your reindexing. In the default configuration of servers, ...
user avatar
3 votes

Magento2 System Requirements PHP Memory Limit

Actually memory_limit is totally up to you, you have to see how your application behaves. Do not be confused with big numbers. Any script must work as fast as possible and take not much than 3-4 times ...
user avatar
  • 3,732
3 votes
Accepted

Correct cache for Magento and settings

it's probably worth differentiating between APC and Memcached so that you understand the difference. Note that you also have both Memcache and Memcached. Of these 2 Memcache is the older option with ...
user avatar
3 votes

Magento 2 Allowed Memory exhausted error when compile code

You need to increase memory allocated to php. To increase memory, execute command php --ini . Findout loaded php.ini. It should be like Configuration File (php.ini) Path: /etc/php5/cli Loaded ...
user avatar
3 votes

Magento 2 Allowed Memory exhausted error when compile code

This situation can be tricky to debug since if you just to php -r "echo ini_get('memory_limit').PHP_EOL;" it shows the memory limit for the PHP in your path, which might be fine. But the magento ...
user avatar
3 votes
Accepted

Magento 1.7 + Apache + 2GB RAM super slow with new theme

In my experience, bought themes are very often put together without following Magento's best practices or built with flexibility in mind more than performance. We've often decided to just theme a ...
user avatar
3 votes
Accepted

Avoiding memory exhaustion when updating product stock?

Avoid saving entire objects One of the biggest problem in your case is that you save the entire stock item every time. It's not performance friendly. For some models, Magento provides a ...
user avatar
3 votes
Accepted

Issue with memory setting up Magento 2.0

Your error indicates the memory limit is 32 MB (very low). Given the ways you've already tried to override it (including through cPanel), I would recommend contacting your host about the problem. You ...
user avatar
3 votes
Accepted

Debug Mage_Index_Model_Event stock related memory problem during checkout

Honestly, it's hard to guess which line consumes the most memory. I suggest you use the profile to find out exactly which line is the culprit. First enable the profiler. Then update the code with ...
user avatar
3 votes
Accepted

How can i solve Larger file import error in wamp - Out of memory

Try these different settings in C:\wamp\bin\apache\apache2.2.8\bin\php.ini Find: post_max_size = 8M upload_max_filesize = 2M max_execution_time = 30 max_input_time = 60 memory_limit = 8M Change to: ...
user avatar
3 votes

How to run deploy command while memory exhausted and we can't able to increase server memory limit?

Before posting a question on Stack Exchange, please have a little look around first, you'll often find the question has already been asked/answered. Maybe just asked in a slightly different way. See ...
user avatar
2 votes

Adding a product in Magento "Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 139564 bytes)"

You may fix it temporarily by adding this line in your index.php ini_set('memory_limit','512M');
user avatar
  • 389
2 votes
Accepted

Adding a product in Magento "Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 139564 bytes)"

Hard Coded 32M memory_limit. If you are running this off a shared server, your memory_limit may be locked down to 32M so you're forced to fairly share resources with others on the server. Magento ...
user avatar
  • 7,573

Only top scored, non community-wiki answers of a minimum length are eligible