Just found a very similar problem with delete on the dashboard which hung if Relevenssi is activated.
Looked into this further and found that 100’s of copies of the deleted post were being created.
On tracing the code found that the Relevanssi function relevanssi_edit was being called continously via an action hook ‘save_post’ which is called from the wordpress wp_insert_post function (Used to move deleted articles to trash). This calls relevanssi_publish() which then calls relevanssi_index_doc().
The problem here is that the default action of relevanssi_index_doc is that it uses the global $post variable by default rather than the $indexpost passed to it if $post is defined. $post is the ID of the post in the loop. In this case this is the page with the dashboard shortcode. Further on in this function any shortcodes in the content of the post identified by the global $post (dashboard in this case) are expanded together with the original query (delete in this case) which then adds the article to trash again and then calls relevanssi and the process repeats ad-infinitum to the server breaks.
Turning the expansion of shortcodes off as Codynew does fixes this. Note I didn’t notice this with ‘edit’ as I had excluded these from the search via Relevanssi’s exclude option but this seems to not apply to deletes.
Obviously a Relevanssi code fix is preferable so other contents generated by shortcodes would be searchable. On further investigating the Relevanssi code I found a reference to a function relevanssi_insert_edit() called from the wp_insert_post action which strangely is always executed after the ‘save_post’ action in both the two wordpress functions it is called: wp_insert_post() and wp_publish_post(). relevanssi_insert_edit() than calls relevanssi_publish() which as mentioned above calls relevanssi_index_doc(). However a parameter of both these functions $bypassglobalpost is set to ‘true’ which disables the use of the global $post.
The description of the relevanssi_insert_edit() function is particularly interesting
// added by lumpysimon
// when we’re using wp_insert_post to update a post,
// we don’t want to use the global $post object
Hmmmm. Why call these functions together when they mostly do the same thing? I hasten a guess that relevanssi_insert_edit() is the fix for our problem but they forgot to disable the old ‘save_post’ hook.
So what happens if I comment out the corresponding line in the relenvanssi file init.php as follows:
//add_action(‘save_post’, ‘relevanssi_edit’, 99, 1);
Presto!!! All fixed.