Magento – Re-index error: Cannot initialize the indexer process

errorreindex

I have a problem re-indexing my Magento website. Sometimes I get the error "There was a problem with reindexing process", but sometimes it's "Cannot initialize the indexer process".

I read a lot of related topics on google which say that I should delete /var/locks folder in my root mangento folder. I don't have such folder in my /var/ folder.

I am having problems reindexing the "Product Prices, Index product prices" index.

Could you tell me what can I do in order to fix this issue? Thanks


Magento Version 1.9 (the latest one)
Hosting OS: Linux technical

Changing memory limit:
I contacted my domain host and they told me my php memory was 128M. However it was only possible to change it to 256M because of my hosting plan. Despite the change, the problem remained.

I was able to reindex all of the things in the index management section, until yesterday. If you say that I have run out of memory (which was 128M), is it possible to clean it in some way so I can get space and be able to reindex again?

Var Folder:
I have the permissions required – 755 – which lets the owner to write – but still no locks folder. The var folder is in my root folder and not in the tmp folder.

I have access to my backend, I am able to Flush all Magento cache. The only thing I am not able to do is reindex this Catalog product price.

Yesterday I created some new attributes and products. Just after that I wasn't able to reindex. Any other suggestions please? Thanks in advance.

Best Answer

Svetoslav,

In the future please post the specs about your hosting OS, version of Magento, etc. I am going to just post some typical solutions to your problem.

Run Indexing from the CLI

  1. from the CLI at the root of your magento installation

    php shell/indexer.php --reindex catalog_product_price
    

No folders in var/

  1. Make sure that the var/ folder has the correct file permissions and ownership. Magento needs to write to those folders.

    Magento Permissions & Privileges

  2. I recently ran across an install of magento that located the var folder in the root tmp folder of the server, you may want to check there. It was located in /tmp/magento/var/ If your var folder is located there, it is because you have a permissions issue.

Change your memory limit

I agree with sean! Change this in your .htaccess that is located in your site root

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