Bulk delete Spam in umbraco

Thursday, April 30, 2009 by Philip

Someone found it funny to add 6000+ spam messages to some of my blog entrys. Umbraco chokes on that abount of replies, and besides it makes no sense having to manually delete each post individually.

I fixed this by running a SQL that moved the bad appels to the Recycle Bin, using the following SQL:

update umbracoNode
set parentid=-20
WHERE (parentID = 1201)
AND (createDate > CONVERT(DATETIME, '2009-01-01 00:00:00', 102))

After that: Just empty the trash.

Well that was what I thought. But for some reason Umbraco deletes each message individually, and uses a lot of connections doing so. In fact I had to change the default (100) to 300 (260 connections was used according to perfmon) in order for the empty trash to complete. And it still took it's bloddy time.

By the way: To cange "Max Pool Size" add this to umbracoDbDSN in Web.config: ;Max Pool Size = 300