If you only want to update a single product attribute without running the indexer, use the following method. It will be possible to update a couple of hundred products per second that way.
First, add a new product attribute estimated_time_of_arrival
.
The, in your update script:
$product->addAttributeUpdate(
'estimated_time_of_arrival',
$date,
$storeId // numeric store id value, e.g. Mage::app()->getStore()->getId()
);
If it's a global scope attribute, the $storeId
doesn't even matter.
If you don't care about the store ID scope, you can also use:
$product->setData('estimated_time_of_arrival', $date)
->getResource()
->saveAttribute($product, 'estimated_time_of_arrival');
Both methods are equivalent (the latter will use $product->getStoreId()
if the attribute has a website or store view scope).
Of course, if you use that attribute in some way that requires indexing, you will have to reindex after the updates.
Try indexing from the command line / ssh. Your VPS should have that functionality.
Execute the following from your /magento_installation/shell
Verifying the status if the indexes:
php indexer.php --status
To reindex the problem index, in your case the Product Flat Data
php indexer.php --reindex catalog_product_flat
Additional information: How to process Magento indexes from the command line
If an error presents itself at that time, there may be a problem with your mysql configuration or with the database itself. Feel free to post the relevant information.
UPDATE BASED ON NEW INFORMATION
I ran into this exact problem last year. You need to create a backup of your database and access via phpmyadmin.
I ended up dropping the table(s) (or you can TRUNCATE them).
catalog_product_flat_1
catalog_product_flat_2
Then use the indexer.php to reindex.
You can reach more about this here
Best Answer
Update on Save is handled by an observer. Check out this class:
Enterprise_Catalog_Model_Index_Observer_Category_Product
Below I've listed the methods you will want to take a look at, and after each method I have listed the events that those methods are attached to.
processProductSaveEvent
enterprise_product_flat
enterprise_catalog_category_product
enterprise_product_price
processUpdateWebsiteForProduct
enterprise_catalog_category_product_website
processCategorySaveEvent
enterprise_category_flat
enterprise_catalog_category_product
enterprise_catalog_category_product
Hopefully this is enough to help you debug the issue!