I can't reindex catalog_category_flat index from web admin, I see an error message. But I can reindex it from the console by running
php shell/indexer.php --reindex catalog_category_flat
without a problem. What could be the problem?
Take backup of database before running the SQL query
Generally this problem due to
max_execution_time according to your server setting.
Two way to do so
1) php.ini (must be in root directory)
max_execution_time = 18000
2) .htaccess (must be in root directory)
php_value max_execution_time 18000