cancel
Showing results for 
Search instead for 
Did you mean: 

Indexing takes not forever

SOLVED

Indexing takes not forever

magento 1.9.3.7

 

have been adding 10000 products and then deleting them and reimporting them again.. about 5 times... (because some products wasn't imported correctly and I wanted to use the first 10000 as a test how good my import script was...)

 

I have 170000 more products to import but feel like I want reindex all the indexes magento uses before I proceed with that... (below you see the results, 12 hours after I started the process, still not completed)

 

php -f shell/indexer.php status             
Product Attributes:                 Require Reindex
Product Prices:                     Require Reindex
Catalog URL Rewrites:               Pending
Category Products:                  Pending
Catalog Search Index:               Running
Tag Aggregation Data:               Running
Stock Status:                       Running

 

reindexing using ssh used to take a few minutes before, but now ages. thinking there is some kind of lock.. but I have no \var\locls\ folder

 

perhaps it is related to my ssh account have limited memory compared to if ran as root and that makes it slower. I contact host company tomorrow

any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Indexing takes not forever

It is solved now, problem was it was running under my SSH user with limited memory. I checked in php error_log and there very many lines complaining about not enough memory. So I guess the guy at proISP fixed it for me running the same commands via root

View solution in original post

8 REPLIES 8

Re: Indexing takes not forever

Hello @Loginna

 

First reset all indexer and run below command

 

php -d memory_limit=4G -f shell/indexer.php --reindexall

Hope it will help you.


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: Indexing takes not forever

 Hello @Loginname,

 

First, try to set the index mode to manual:

php shell/indexer.php --mode-manual catalog_product_attribute
php shell/indexer.php --mode-manual catalog_product_price
php shell/indexer.php --mode-manual catalog_url
php shell/indexer.php --mode-manual catalog_product_flat
php shell/indexer.php --mode-manual catalog_category_flat
php shell/indexer.php --mode-manual catalog_category_product
php shell/indexer.php --mode-manual catalogsearch_fulltext
php shell/indexer.php --mode-manual cataloginventory_stock
php shell/indexer.php --mode-manual tag_summary

 

Then, try to reindex all indexes:

php shell/indexer.php reindexall


And set the mode to realtime again:

php shell/indexer.php --mode-realtime catalog_product_attribute
php shell/indexer.php --mode-realtime catalog_product_price
php shell/indexer.php --mode-realtime catalog_url
php shell/indexer.php --mode-realtime catalog_product_flat
php shell/indexer.php --mode-realtime catalog_category_flat
php shell/indexer.php --mode-realtime catalog_category_product
php shell/indexer.php --mode-realtime catalogsearch_fulltext
php shell/indexer.php --mode-realtime cataloginventory_stock
php shell/indexer.php --mode-realtime tag_summary

 

If you find my answer useful, Please click Kudos & Accept as Solution.

Re: Indexing takes not forever

Unsure with what you mean with reset index, but have executed your command and still the same issue


@Sunil Patel wrote:

@hello @Loginna

 

First reset all indexer and run below command

 

php -d memory_limit=4G -f shell/indexer.php --reindexall

Hope it will help you.


 

Re: Indexing takes not forever


@Mayur Bhuva wrote:

 Hello @Loginname,

 

First, try to set the index mode to manual:

php shell/indexer.php --mode-manual catalog_product_attribute
php shell/indexer.php --mode-manual catalog_product_price
php shell/indexer.php --mode-manual catalog_url
php shell/indexer.php --mode-manual catalog_product_flat
php shell/indexer.php --mode-manual catalog_category_flat
php shell/indexer.php --mode-manual catalog_category_product
php shell/indexer.php --mode-manual catalogsearch_fulltext
php shell/indexer.php --mode-manual cataloginventory_stock
php shell/indexer.php --mode-manual tag_summary

 

Then, try to reindex all indexes:

php shell/indexer.php reindexall


And set the mode to realtime again:

php shell/indexer.php --mode-realtime catalog_product_attribute
php shell/indexer.php --mode-realtime catalog_product_price
php shell/indexer.php --mode-realtime catalog_url
php shell/indexer.php --mode-realtime catalog_product_flat
php shell/indexer.php --mode-realtime catalog_category_flat
php shell/indexer.php --mode-realtime catalog_category_product
php shell/indexer.php --mode-realtime catalogsearch_fulltext
php shell/indexer.php --mode-realtime cataloginventory_stock
php shell/indexer.php --mode-realtime tag_summary

 


Still the same issue after doing this

Re: Indexing takes not forever

What more info you need to diagnose this problem? I will tomorrow call the hosting company in hope they can help as for example running the same commands as me but as root or antoher user with extra resources.. Have called them when this problem started and they solved 2 indexes...

 

Some info from my server:

Physical Memory Usage: 1.92 GB / 3 GB (63.88%)

Disk Usage : 36.36 GB / 60 GB (60.59%)

 

All the catalog_product_flat tables have 0 records

Re: Indexing takes not forever

What if I delete all products and then reindex again, can that help?

 

I have made a script for importing so that is fine for me

Re: Indexing takes not forever

I've tried to run SHOW PROCESSLIST;, but show nothing special

error.jpg

Re: Indexing takes not forever

It is solved now, problem was it was running under my SSH user with limited memory. I checked in php error_log and there very many lines complaining about not enough memory. So I guess the guy at proISP fixed it for me running the same commands via root