I was getting below error today:
There was a problem with reindexing process.SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails ('database'.'#sql-70c_45b87', CONSTRAINT 'FK_CAT_PRD_FLAT_2_ENTT_ID_CAT_PRD_ENTT_ENTT_ID' FOREIGN KEY ('entity_id') REFERENCES 'catalog_product_entity' ('entity_id') ON DELETE CASCADE ON UPDAT)