Heisenbug: can't delete user without post in rapid succession of deleting users without posts

AI-generated summary

In a discussion about a Heisenbug preventing user deletion during rapid batch operations, dandv reports that while manually deleting approximately 15 spammer accounts at a time, they encounter intermittent errors. About 10-15% of the time, a specific error message appears requiring a retry, while roughly 25% of the time, a generic “Something went wrong” message occurs, likely due to server load on their 1GB VPS. codinghorror asks about the source of the spam, prompting dandv to explain the issue stems from a MyBB import where the search functionality is unreliable. Because the database contains active staff activity, a full wipe and re-import is not feasible. Consequently, dandv requests a utility script to enable batch user deletion based on email domains as a workaround for the lack of native batch operations.

I’m deleting a bunch of spammers manually since there’s no batch mode for user operations: from the Users search results table with emails shown, I ctrl+click on the spammers to open them in new tabs, about 15 at a time. Then I go to each tab, click Delete User → Delete only, and move to the next tab.

About one in 10 to 15 times, I get this error:

If I click OK and Delete again, the deletion succeeds.

Much more often (~25% of the cases), I get

: - (
Error
while trying to load
Something went wrong.

which I assume is due to load on the server? I use a 1GB VPS and there are no active users.

Why do you have so many spammers? Is this an import issue? Did you install the Akismet plugin?

It’s an import issue from MyBB. The search by email feature in MyBB is crappy and finds nothing for, for example, “freemail.hu”. I ran an import a few months ago, and even though since I’ve cleaned up more of the MyBB userbase, running the import again preserves users imported back then. In the meantime there has been activity in the Staff category, so I can’t wipe out the DB and import from scratch.

I’d be happy if there were a utility script I could tweak, that allowed simple batch operations on users, such as deleting users if their email matches a given domain.