The distribution contains a new folder ‘shell’. It contains some php-cli applications. One of those reindexes your db. All you have to do is add it to your cron setup.
The distribution contains a new folder ‘shell’. It contains some php-cli applications. One of those reindexes your db. All you have to do is add it to your cron setup.
I keep getting a message saying “PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 140 bytes) in /var/www/vhosts/mywebsite.com/httpdocs/app/code/core/Mage/Index/Model/Mysql4/Process/Collection.php on line 32” when I try to execute indexer.php from the command line. Even if I’m just using the “info” command. The “help” command works fine however. I have set both my server’s php.ini file to 128M and the .htaccess file to 128M, but for some reason it is being overridden by some file loaded via indexer.php. Any ideas on how to overcome this?
I keep getting a message saying “PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 140 bytes) in /var/www/vhosts/mywebsite.com/httpdocs/app/code/core/Mage/Index/Model/Mysql4/Process/Collection.php on line 32” when I try to execute indexer.php from the command line. Even if I’m just using the “info” command. The “help” command works fine however. I have set both my server’s php.ini file to 128M and the .htaccess file to 128M, but for some reason it is being overridden by some file loaded via indexer.php. Any ideas on how to overcome this?
Try commenting out php_value memory_limit and php_value max_execution_time in your .htaccess file. If you’re using a php.ini file to set your memory limit and your execution time it conflicts with your .htaccess file.
On a side note… When I run this command through a cron job I get ALL results instead of the “indexer” I’ve specified. For example
/usr/local/bin/php -f /home/accountname/public_html/shell/indexer.php -- status 7
Try commenting out php_value memory_limit and php_value max_execution_time in your .htaccess file. If you’re using a php.ini file to set your memory limit and your execution time it conflicts with your .htaccess file.
On a side note… When I run this command through a cron job I get ALL results instead of the “indexer” I’ve specified. For example
/usr/local/bin/php -f /home/accountname/public_html/shell/indexer.php -- status 7
When I run indexer.php reindexall from php ssh shell I’ve got this:
The script whose uid is 10001 is not allowed to access /var/www/vhost/..,,,,./httpdocs/var/log/system.log owned by uid 48
Tell me that is a SAFE MODE Restriction in effect.
You can solve this problem using asynchronus queue. Check this one Fast Asynchronous Re-indexing http://mirasvit.com/magento-extensions/magento-asynchronous-reindex.html. After each product/category save this extension move reindex task to queue and process this queue as background process in cron.