Article Original Creation Date: 2003-03-18
This KB applies to PSS3.x HTTP-based sync.
If you are receiving this error ('Timeout expired') then the DSM most likely also appears to be shut down without reason.
The error in the pvttrace_x.log may be repeated numerous times and would appear in the format listed below:
Microsoft OLE DB Provider for SQL Server
IDispatch error #3121
error during ADO SQL Select command
This error is due to the fact that the SQL Server log file for the SyncStream database has grown to a size that causes a considerable delay in the processing of regular SQL statements.
View the physical size of the ldf file (by default in \Program Files\Microsoft SQL Server\MSSQL\Data\SyncStream_log.ldf) in Windows Explorer to see if this is, in fact, the case in your situation. The error tends to start appearing (but not always) as the ldf file's size is approaching 1GB.
Keep in mind that imports and heavy sync use will cause the ldf file to grow quickly and that regular maintenance of the SQL Server needs to be implemented to ensure this log file does not grow to this size. If this is the case, the log file needs to be truncated and shrunk to a smaller size (as small as possible - max file size recommended is approximately 500MB).
Some possible SQL statements to accomplish this are as follows (make sure to run the statements against the database affected):
dbcc shrinkfile(filename, size in MB)
For example, the following syntax will shrink the SyncStream log file to 5MB:
dbcc shrinkfile(SyncStream_log, 5)
After this, you may have to run the following to actually purge the files transactions.
backup log WITH TRUNCATE_ONLY
backup log SyncStream WITH TRUNCATE_ONLY
Please be aware that this purges the log entries oldest to newest when re-sizing the log. You may want to physically backup the LDF file to a different location before doing this or according to your backup strategies.
Note: the above SQL statements are for informational purposes only and should not be run against a production database without understanding the implications of doing so.