Skip to content

Indexing takes way too long #33

@OvalMedia

Description

@OvalMedia

I am using asynchindex in a magento 1.9.4.1. Each night an importer pulls thousands (~11k atm) of products from another database using the default magento models (no fancy stuff here).
This has been working nicely until recently when customers started telling us they could not order due to error messages like these:

General error: 1205 Lock wait timeout exceeded; try restarting transaction, query was: SELECT si.*, p.type_idFROMcataloginventory_stock_itemASsiINNER JOINcatalog_product_entityASpON p.entity_id=si.product_id WHERE (stock_id=1) AND (product_id IN(67680, 67850, 74053, 74055, 66988, 66987, 66989, 66990, 94395, 68370, 67769, 67768, 67761, 68372, 67762, 67643, 67642, 68597, 67232, 74325, 67654, 66763, 66761, 66762, 67061, 69664, 66808, 67864)) FOR UPDATE

I must assume that the reason it has been working for a while is because the total amount of products is constantly rising.

I tried to debug and watched the database with "show processlist". The indexer kept working for hours and seemingly slow. On my dev machine it runs a lot faster although it has less power than the live server. So I killed all processes and strightened the index by using the default shell script (php indexer.php --reindexall). This worked fine and all the indexes were rebuild within minutes.

So my question is: why is there such a big difference in the performance? What could I do to get to the core of the issue here?

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions