While re-indexing from the Magento Admin Panel sometimes we get errors like “An error occurred while saving the URLrewrite” or “cannot initialize indexer process” , etc
So method to solve the above problem:-
1.Go to the Magento root installation directory through FTP or Cpanel or etc and goto var/locks directory and delete all the files under it.
2. Go to the Magento database by login to phpMyAdmin or etc and run the below MySQL query
Note :- It is advisable to take backup of database before running the above SQL query.
3.Login to Magento Admin panel & again re-index from Index management panel