39554: Error: [Windows]MassTransit Engine Terminates Unexpectedly; Application Event Log Reports "Incorrect key file for table xxxxx."

Translate to:

Applies to:

Symptom:

The MassTransit Engine on Microsoft Windows platforms terminates unexpectedly. The Windows Application Event Log reports the following error message:

"Invalid key file for table 'xxxxx'; try to repair it."

Steps to Reproduce:

The MassTransit Engine may terminate unexpectedly. Following this event, both the MassTransit Engine and the MySQL Server services will produce errors that are visible within the Application Log of the Windows Event Viewer.

The MySQL Server service may report the following error:

"C:\Program Files\MySQL\MySQL Server x.x\bin\mysqld-nt: Incorrect key file to table 'xxxxx'; try to repair it."

The MassTransit Engine service may also report a similar error:

"SA_Exception[xxx]: DB_Files_Add: Incorrect key file for table 'xxxx'; try to repair it."

To view the Application Log of the Windows Event Viewer, please follow this procedure:

  • Start > Settings > Control Panel > Administrative Tools > Event Viewer.
  • Once the Event Viewer has launched, select the "Application" log in the left window pane.

Cause:

The MySQL Server service utilizes temporary data files to store information during normal operations. These files are written to the Windows temporary directory, normally found at the location: C:\Windows\Temp. The data contained within these files is then flushed to the 'live' MySQL database, which is found at the location: C:\Program Files\MySQL\MySQL Server x.x\data.

In certain cases, other services that actively monitor these directory locations may interfere with access to these temporary files or live databases. As a result, MySQL is unable to flush data to the live database. In this event, MySQL may report the error as mentioned above. Following this error, the MassTransit Engine, which relies upon the MySQL backbone, will terminate.

Workaround:

It is recommended that the Windows Temporary directory and the MySQL Data directory be excluded from any products that may obtain an active file handle (or lock) on files contained within these directories. The specific directories are:

C:\Windows\Temp C:\Program Files\MySQL\MySQL Server x.x\data [Note: x.x should be replaced with the version of MySQL Server currently in operation].

MySQL Support has additionally recommended the use of External Locking. "External locking is the use of file system locking to manage contention for database tables by multiple processes. External locking is used in situations where a single process such as the MySQL server cannot be assumed to be the only process that requires access to tables[files]." Please refer to the MySQL Reference Manual article for more information on External Locking. The URL to this documentation has been provided below.

Please refer to vendor specific product manuals for the procedures in which files and folders may be excluded from services that may conflict with MySQL Server.

NOTE: If the MySQL Data directory is excluded from any backup operations, it is important that alternative arrangements for data backups are made. Live system backups may be accommodated via the MySQL Administrator. Please reference the URL below for detailed instructions on enabling scheduled, repetitive MySQL database backups.

Fix:

There is no fix at this time. Please see workaround.

Related Articles:

Tags: 

You are reporting a typo in the following text:
Simply click the "Send typo report" button to complete the report. You can also include a comment.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
9 + 3 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.