Recovery never completes

Jul 31, 2012 at 8:12 AM

I have a customer complaining about issues with the database not being able to come up from restart.

The event log shows:

Source:        ESENT

Date:          7/30/2012 3:03:26 PM

Event ID:      301

Task Category: Logging/Recovery

Level:         Information


Raven (5500) e:\RavenData\Tenants\Content\Data7d829544-5293-4d96-8762-f3e472ad1066: The database engine has begun replaying logfile e:\RavenData\Tenants\Content\logs\RVN009F6.log.

And then it just hangs.

The log file is 16 MB in size, the database itself is quite large.


Any ideas what might be happening or how to debug this?

Aug 1, 2012 at 3:30 AM

It shouldn't be slow.

You support XP, right? Do you know if it was running on XP? There were some bugs in log replay in XP that were fixed in Server 2003. They got worse when you had to replay more log files, so sometimes it was possible to run `esentutl.exe -r rvn`, get some progress, kill it after a while, and keep on trying. It was brutal, but it allowed some forward progress to be made.

If it was on your machine, I'd suggest looking at the 'Database' perf counters to see if there was still progress being made (or even just looking at taskmgr). I'd also suggest dumping the database header (esentutl -mh <databasename>) to see which log files were needed for replay, and looking at the log file content (esentutl -ml rvn009f6.log -v > rvn009f6.log.txt) to see what's in there.

It's also possible that your 16 MB log file has many small log records that end up referring to a lot of the database (which coincides with your 'database is quite large' comment). This just means that the file has to be read from disk, and that can degrade to lots of random IO (especially if your database cache size is set small). The Online Defrag task is notorious for producing dense log files like this.

Hope that helps!


Aug 1, 2012 at 11:44 AM

The database size is 3.3 GB.

The server is NOT xp, I am still in contact with the customer, but it is either 2008 or 2008 R2, most likely.

Aug 2, 2012 at 4:19 PM

Correction, the DB size is 18GB, and the OS is 2008 R2

The application has been running in IIS, and an iisreset would sometimes cause it to go into recovery, even though it is suppose to shutdown normally in this manner.