XF 2.1 Batch update users results in MySQL overload

duderuud

Well-known member
Licensed customer
I want to remove a LOT of (spam)users with zero posts. Looks like the process is a query so large that the database crawls to a halt.

The xf_jobs table has a lot of data and empty that table speeds things up again. But that is a dirty workaround because it cleans up afaik.
Is there a way to run that job with low priority? I don;t care it takes hours and hours, as long as the DB keeps responsive...
 
If you are subscribed to @AndyB addon package, he has a pretty cool addon for this which deletes x number of users on a configured schedule.

Or maybe you can limit the number of users being deleted in one go by filtering by registered date. This is what Andy's addon does. Basically delete accounts older than 365 days with zero posts.
 
Just refine the criteria for the batch update to reduce the amount of matches.

The registered between dates should work best for that.
 
That sounds like a poorly configured server.

I just did a batch delete of 1,000 users on localhost (on a Windows machine which is over 10 years old) and it was done in 2-3 seconds.
 
Could be.

Or maybe the difference is that my DB is over 30GB in size with over 30 million posts, 250,000 users and about 700 active users online...
 
Did some searching. Seems that it could be an index problem...
 
Update 2: Upgraded my beta forum tot 2.2 b3.

I can confirm the the comment of @Mike in the topic above. I successfully deleted 24k users without any issues.

PS. The beta server has half the amount of cpu's and memory compared to the production DB server.
 
Last edited:
Back
Top Bottom