Please try to increase the timeout. Paste the following lines into wp-config.php in the base location of your WordPress installation.
define( 'TAG_GROUPS_CHUNK_TIMEOUT', 60000 );
define( 'TAG_GROUPS_TASK_TIMEOUT', 10000000 );
Numbers are in milliseconds.