3
votes

I'm having an issue while crawling the extendware ewcrawler.php file through command prompt like,

user@xxxx [/home/user/public_html/shell/extendware/ewcrawler]# php crawler.php -v

And getting an below error,

Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 1792 bytes) in /home/user/public_html/app/code/local/Extendware/EWCore/Model/Mage/Core/Abstract.php(45) : eval()'d code on line 45

​Even the PHP_memory_limit is set to 512 MB on both config (php.ini and .htaccess)​ I have checked and tested after increasing the current memory_limit value also but still hitting to the same issue.

Can anyone please advise on the same.

3

3 Answers

1
votes

If the crawler is being run from a command line script, the php memory_limit will need to be increased for the command line php interpreter. This is not done from .htaccess. Where this is done is dependent on the Linux distro you are running, but there ususally will be separate php.ini files for Apache DSO, cgi-fpm, and command line.

Alternatively a memory directive can added to the script. Just remember that it will disappear the next time you apply an upgrade from Extendware.

ini_set('memory_limit','512M');

Also, since this is a third party Magento module, you should be talking to Extendware about this as the developers often are a lot quicker at pinpointing problems with code they're intensely familiar with.

0
votes

in php.ini changed as follows: memory_limit = 512MB to memory_limit = 536870912.

0
votes

If you have access to .htaccess file in Magento root try to increase memory there

php_value memory_limit 64M