Sunday, November 9, 2008

Why Kasperky is bad for your server

Recently I've had problems with a Windows 2003 VPS. Every once in a while I found it haveing 0 MB of free space. The cause were huge SQL Server Log files (over 10GB files) containing only the following error message:

2008-11-06 00:18:46.31 spid22s Error: 9001, Severity: 21, State: 1.
2008-11-06 00:18:46.31 spid22s The log for database 'ItJob' is not available
. Check the event log for related error messages. Resolve any errors and restart
the database.

Obviously the event logs didn't bring anything usefull (thanks microsoft - we love you):

Error: 17300, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.

With a little research I discovered the SQL Error is usualy releated with IO errors and IO operations that don't complete in time. So I turned my attention to the newly installed Kaspersky antivirus. It was using 10-30% of the CPU doing something even though I had disabled it a few minutes ago. I check it's logs to find out what and discovered it was running a full disk scan that coincidentaly started 40 seconds before the first log entry done by SQL Server. Now this was a revelation!

Kaspersky starts a disk scan that slows down the IO so bad it make SQL Server 2005 crash and burn. I found my culprite and now I'm happy I first installed a trial version of Kaspersky and didn't buy it directly. It's good for desktop but desastrous for your server

0 comments: