Magento – Catalog URL Rewrites hanging, index process unknown error

More Magento fun. SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction popped up all of sudden.

The error context indicated something got jammed up during the reindexing process, and Catalog URL Rewrites was failing to reindex properly. This was causing timeouts, database deadlocks and serialization failures.

Take a snapshot before proceeding.

The fix that worked for me:

  • rm /var/www/html/var/locks/*
  • Hop into phpMyAdmin and truncate table core_url_rewrites or use CLI mysql:
    • mysql -u root -p
    • use storedatabasename
    • truncate core_url_rewrites
  • php -f /var/www/html/shell/indexer.php –reindexall

Leave a Reply