Hi Emma:
When you see an error like that, you'll want to check the 'view details' button and the site logs for more detail about what's going wrong. Some possible causes of errors like that include running out of disk space, JVM heap space, or "something else" interfering with the search index (like two instances of LabKey pointing to the same index). In some cases batching a large delete into smaller chunks may work around an issue like that.
I will move this question to your custom support portal for further detailed followup.
--Molly