Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 3
Category Flat Data - Can’t initialize indexer process
 
wannabe_geek
Member
 
Avatar
Total Posts:  41
Joined:  2009-06-22
 

Problem:
In Index Management, Category Flat Data always shows as Processing. When I try to reindex data, I get an error stating Can’t initialize indexer process. Anyone know why it’s doing this?

Also when I create configurable products, all is fine but after a few times creating I suddenly get an error stating....

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`database-name/catalog_product_index_eav`, CONSTRAINT `FK_CATALOG_PRODUCT_INDEX_EAV_ENTITY` FOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON )

I guess the two are related, screenshots of errors are attached, any suggestions?

Setup:
> Magento ver. 1.4.0.1
> PHP Version 5.2.12
> MySQL 5.0.89

Image Attachments
screen.pngscreen1.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
uqppa
Jr. Member
 
Total Posts:  2
Joined:  2010-01-21
 

Problem:
In Index Management, Category Flat Data always shows as Processing. When I try to reindex data, I get an error stating Can’t initialize indexer process. Anyone know why it’s doing this?

I’ve had the same problem after adding a new attribute. After spending some time looking for the problem, I’ve found that reindexing Category Flat Data didn’t work when either Used in product listing or Used for sorting in product listing i set to Yes, so try to set both of them to No.

I don’t know if this will solve your problem, it worked for me.

 
Magento Community Magento Community
Magento Community
Magento Community
 
wannabe_geek
Member
 
Avatar
Total Posts:  41
Joined:  2009-06-22
 

The attribute I’m using already has no in both those fields.

 
Magento Community Magento Community
Magento Community
Magento Community
 
idea-net
Jr. Member
 
Total Posts:  25
Joined:  2010-02-03
 

Have you found a solution ? I have the same problem…

magento 1.4.0.1 (fresh installation, no upgrade)

this is my error on exception.log:

2010-05-03T21:05:20+00:00 DEBUG (7): Exception message: Notice: Undefined index:  31 in /var/www/html/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Flat.php on line 695
Trace: #0 /var/www/html/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Flat.php(695): mageCoreErrorHandler(8, ‘Undefined index...’, ‘/var/www/html/a...’, 695, Array)
#1 /var/www/html/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Flat.php(446): Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Flat->_getAttributeValues(Array, ‘1’)
#2 /var/www/html/app/code/core/Mage/Catalog/Model/Category/Indexer/Flat.php(237): Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Flat->rebuild()
#3 /var/www/html/app/code/core/Mage/Index/Model/Process.php(139): Mage_Catalog_Model_Category_Indexer_Flat->reindexAll()
#4 /var/www/html/app/code/core/Mage/Index/Model/Process.php(167): Mage_Index_Model_Process->reindexAll()
#5 /var/www/html/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(124): Mage_Index_Model_Process->reindexEverything()
#6 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Index_Adminhtml_ProcessController->reindexProcessAction()
#7 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch(’reindexProcess’)
#8 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Front.php(177): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#9 /var/www/html/app/code/core/Mage/Core/Model/App.php(304): Mage_Core_Controller_Varien_Front->dispatch()
#10 /var/www/html/app/Mage.php(596): Mage_Core_Model_App->run(Array)
#11 /var/www/html/index.php(78): Mage::run(’’, ‘store’)
#12 {main}

Luca

 
Magento Community Magento Community
Magento Community
Magento Community
 
marklapsley
Jr. Member
 
Avatar
Total Posts:  4
Joined:  2009-09-03
Brighton
 

Hi

i fixed this my deleting the .lock files in var/locks the did the re index and all worked fine

 
Magento Community Magento Community
Magento Community
Magento Community
 
idea-net
Jr. Member
 
Total Posts:  25
Joined:  2010-02-03
 

lock files already deleted and haven’t resolved the problem

 
Magento Community Magento Community
Magento Community
Magento Community
 
Kotora
Jr. Member
 
Total Posts:  6
Joined:  2009-02-25
 

Problem solved.
i got exactly the same problem. I used a custome Magento SSH Install Script to install magento.
but that script was running under root access so the folder var/locks was owned by user “root”
i just simply changed that by entering this command in magento root
chgrp psaserv * -R

in my case magento is running on Plesk 9.5
i hope this is helpful

 
Magento Community Magento Community
Magento Community
Magento Community
 
idea-net
Jr. Member
 
Total Posts:  25
Joined:  2010-02-03
 

I have the correct rights for this folder :-(

 
Magento Community Magento Community
Magento Community
Magento Community
 
Martin Ashcroft
Jr. Member
 
Total Posts:  17
Joined:  2009-04-28
 

I have the same problem but with the Category Products index. Everything else works fine. My lock files belong to apache. I have a dozen or so sites already working this way but this site is on a new server so maybe it is something to do with server settings and the way permissions are set.

 
Magento Community Magento Community
Magento Community
Magento Community
 
reshel
Member
 
Avatar
Total Posts:  38
Joined:  2010-03-24
East Texas
 

i got this error after deleting a couple of attributes and changing others to not be included in the search.. I was having a problem with my searches not working.. so I did some editing of attributes as stated in another post.. now Im getting this index error on the Product Prices Index product prices - it says it is always processing and i get the error.

Can’t initialize indexer process.

i soloved the search problem by editing the price attribute to be included in the comparable and not in the search and now the search results are coming up.. BUT I am getting this error on the index..

please help, my site is going public in a couple of days.. everything seems to look ok. .Im not getting any errors on the front end.. only inthe indexing on the proces..

WhAT IN THE WORLD???. all i did was delete the color attibute that was in on the default install.

PLEASE HELP- I appreciate any suggestions.
im running 1.4

 
Magento Community Magento Community
Magento Community
Magento Community
 
adolmedia
Jr. Member
 
Avatar
Total Posts:  16
Joined:  2009-04-02
 

Hi everyone,

For peoples facing problem with Catalog product fulltext search re-indexing with error message “Some problem with reindexing process.” or “Can’t initialize indexer process”, please find below the fix.

Create a file called “search-reindex.php” inside your magento root folder and put the following code.

<?php
require_once 'app/Mage.php';
umask);
Mage :: app"default" );
Mage::log("Started Rebuilding Search Index At: " date("d/m/y h:i:s"));
$sql "truncate catalogsearch_fulltext;";
$mysqli Mage::getSingleton('core/resource')->getConnection('core_write');
$mysqli->query($sql);
$process Mage::getModel('index/process')->load(7);
$process->reindexAll();
Mage::log("Finished Rebuilding Search Index At: " date("d/m/y h:i:s"));

Then run this script by visiting http://www.yourdomain.com/search-reindex.php in your browser.

That’s it. It will now work like a charm.

Regards,
Rahman - AdolMedia

 
Magento Community Magento Community
Magento Community
Magento Community
 
duffybelfield
Sr. Member
 
Avatar
Total Posts:  119
Joined:  2008-08-14
 

Did anyone get anywhere with this? I am stilling having issues with Category Flat Data and search doesn’t seem to work :(

 
Magento Community Magento Community
Magento Community
Magento Community
 
riceguitar
Jr. Member
 
Total Posts:  5
Joined:  2008-08-20
 
A.H.Rahman - 02 June 2010 06:49 AM

Hi everyone,

For peoples facing problem with Catalog product fulltext search re-indexing with error message “Some problem with reindexing process.” or “Can’t initialize indexer process”, please find below the fix.

Create a file called “search-reindex.php” inside your magento root folder and put the following code.

<?php
require_once 'app/Mage.php';
umask);
Mage :: app"default" );
Mage::log("Started Rebuilding Search Index At: " date("d/m/y h:i:s"));
$sql "truncate catalogsearch_fulltext;";
$mysqli Mage::getSingleton('core/resource')->getConnection('core_write');
$mysqli->query($sql);
$process Mage::getModel('index/process')->load(7);
$process->reindexAll();
Mage::log("Finished Rebuilding Search Index At: " date("d/m/y h:i:s"));


Then run this script by visiting http://www.yourdomain.com/search-reindex.php in your browser.

That’s it. It will now work like a charm.

Regards,
Rahman - AdolMedia

When I ran this, it displayed the underlying root cause of the index error that magento was hiding:

Fatal errorUncaught exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[08S01]: Communication link failure: 1153 Got a packet bigger than 'max_allowed_packet' bytes' in /var/www/golfjoy.com/public/lib/Zend/Db/Statement/Pdo.php:234 Stack trace#0 /var/www/golfjoy.com/public/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array) #1 /var/www/golfjoy.com/public/lib/Zend/Db/Adapter/Abstract.php(468): Zend_Db_Statement->execute(Array) #2 /var/www/golfjoy.com/public/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array) #3 /var/www/golfjoy.com/public/lib/Varien/Db/Adapter/Pdo/Mysql.php(333): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array) #4 /var/www/golfjoy.com/public/lib/Varien/Db/Adapter/Pdo/Mysql.php(1452): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ca...', Array) #5 /var/www/golfjoy.com/public/app/code/core/Mage/CatalogSearch/Model/Mysql4/Fulltext.php(613): Varien_Db_Adapter_Pdo_Mysql->insertOnDuplicate('catalogsearch_f...' in /var/www/golfjoy.com/public/lib/Zend/Db/Statement/Pdo.php on line 234

I set max_allowed_packet = 16M in my.cnf and the index worked.

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Beena K M
Member
 
Total Posts:  50
Joined:  2009-01-06
Cochin, Kerala, India
 

It may be problem of your database permission for your database user in your hosting server.

The mysql database user have full permission for database including drop table also. Please check it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
tvshow
Jr. Member
 
Total Posts:  9
Joined:  2010-06-07
 

I’ve got the same problem. Deleting var/locks didn’t do the trick, nor did search-reindex.php. Any ideas?

Image Attachments
broken-magento-index.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
Beena K M
Member
 
Total Posts:  50
Joined:  2009-01-06
Cochin, Kerala, India
 

You can find the correct problem by display the correct error message in try {} catch {} function in the corrsponding controller file in reindex process.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 3