Cleaning after spam-bots
Monday, March 02, 2009
0 comment(s)
On this blog, a (couple of) spam-bot(s) has played with my
comments for a while, which is ended up with a lot of crappy nodes
(~10.000 nodes)
So, I descides to skip all the comments (including the real ones
as there only was a little amount) by deleting the documenttype for
the blog post comments.
But this is not so easy as I thought. When I do this, the
Umbraco backend hangs for a while, and end up with a server
error:
Timeout expired. The timeout period elapsed prior to
obtaining a connection from the pool. This may have occurred
because all pooled connections were in use and max pool size was
reached.
I think that could be solved if I had the control over the IIS
and the connection pool, but I'm running on a shared host. After a
while, I'm able to log in to Umbraco again, empying the recycle
bin, which only has between 50 and 100 items. Then I start over the
process again.
Yuck!
Update:
I tried to change the connection value to increase the pool-size
and timeoutvalue, but this doesn't seems to speed up the
process.
Instead, I decided to do the cleanup directly in the database. I
located all cmsContent rows with the id of the doc. type I wanted
to delete, and deleted them all. Then I deleteded the corresponding
values in umbracoNode table, cmsDocument, and the corresponding
values in cmsPropertyData (Linked to umbracoNode). I know it's
risky to change/delete values directy in the database - speciel
when you not know the datamodel 100%. But this is only my private
blog, and I did a backup before, so I took the change. Afterwards
It seems to works :-)