Quote:
Originally Posted by tpearl5
Getting a whole lot of these one day a week:
DELETE FROM `vb_badbehavior` WHERE `date` < DATE_SUB('27-02-2012 22:22:40', INTERVAL 7 DAY)
INSERT INTO `vb_badbehavior` (`ip`, `date`, `request_method`, `request_uri`, `server_protocol`, `ht...
The inserts are building up because the vb_badbehavior table is locking.
|
btw, I figured out this happens when the vb_badbehavior table is fairly large and something is continually hitting my site and being blocked by bad bahavour. The database can't keep up with the deletes and inserts when it has to go through 1 million + records several times a second. Keeping the log pruned (unfortunately a manual task) and adding this index seems to help a bit:
ALTER TABLE `vb_badbehavior`
ADD INDEX `date` (`date`)