Resolving Database Upgrade Timeout Failures for Shavlik Protect

Version 8

    Purpose

     

    Customers with a large number of previous scan results and/or a slow or heavily loaded SQL server may experience a failure when upgrading their Protect database from one version to another.

     

    This document is meant to provide a resolution for database upgrade issues where the main reason for failure is a database connection timeout.

     

    Symptoms

     

    You recieve a message such as the following within the GUI or a pop up window of the upgrade:

    - "Database conversion error"

    - "Database connection timeout"

    - "Failed to commit the database installation or upgrade"

     

    AND

     

    The ST.DatabaseConfiguration.log may contain one of the following errors:


    System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

     

    2013-05-09T11:42:11.2629539Z 0001 E DBInstallWizard.WizardFinishClick|Failed to commit or save the database installation.: A SQL Server query operation timed out. Consider increasing the command timeout in the configuration file.

     

    SqlError message: 'Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.'

     

    Cause

     

    The database upgrade process may be taking longer than the default alotted timeout period, or the connection to the SQL server may be slow/unstable.

     

    Resolution

     

    There are two suggested steps to work around this issue:

     

    1) The SQL transaction log may be significantly larger than necessary.  Using SQL Server Management Studio, verify that the transaction log for your database is set to grow or has a max size setting that is large enough (we have seen 4GB databases require 12GB for logs).  Do a FULL back up of the transaction log to force its truncation.  This is a good practice to verify that enough free disk space is available to perform the upgrade process.

     

    It may help to review this document as well: http://community.shavlik.com/docs/DOC-2187

     

    2) The database upgrade function may be timing out on a single command.  The default command timeout is 30 minutes.  This timeout is implemented to provide feedback in case the command is not responsive or hangs.  However, in some environments altering tables with large amounts of data may require more than 30 minutes to complete.

     

    If the upgrade failure was related to a timeout, this timeout value can be by running the installer with an extra parameter from commandline as follows:

     

    For instance: Shavlik Protect 9.0:  "ShavlikProtectPatch_9.0.1182.exe"  /wi:"DBCOMMANDTIMEOUT=10800"

     

    Note: The value is in seconds (10800 equals 3 hours)

     

    Affected Product(s)


    Shavlik Protect 9.x