english francais

ENT Server is slow and/or I'm getting lots of "Timeout expired" error messages

This article discusses possible causes and resolutions for timeout expired error messages

Article Details

Under the hood, ENT Server is using an MS SQL Server database. These databases are made up of two files:

  1. A data file, which contains all the actual data in the various tables in the database
  2. A log file, which is used to ensure that transactions are atomic and basically to maintain the integrity of the data files.

The log file will keep a log of all transactions that ever take place on the database - which means it's keeping track of quite a lot of activity. As a result, over time the log file for your ENT Server databases may grow and grow until reads and writes to this file start taking a very long time and eventually until you run out of disk space (this file will quite happily grow well over 100 GB in size if left for a long time).

As such, it may pay on occassion to do a little bit of house keeping - basically throwing out old log information that isn't likely to be useful anymore... for example the fact that a transaction involving the writing of data to a couple of tables succeeded 6 months ago. This can be achived by issuing the following SQL commands to your database server:

USE master
BACKUP LOG
mf_enterprise WITH TRUNCATE_ONLY
USE mf_enterprise
DBCC SHRINKFILE(mf_enterprise_log, 2)
USE master
BACKUP LOG
mf_enterprise WITH TRUNCATE_ONLY

Note: The above commands will result in the permanant loss of data and you should perform a full backup of your databases before doing this.

Probably you won't have to do this very often but you might also like to setup a batch file that issues these commands to your SQL Server using oSQL (or similar) and have this batch file run as a scheduled task in Windows every couple of months so that you don't have to think about it again.