PRB: Must Restart MSMQ Service to Cleanup Message Files

ID: Q199312


The information in this article applies to:
  • Microsoft Message Queue Server version 1.0


SYMPTOMS

MSMQ message files accumulate and are only deleted when you startup the MSMQ Service.


CAUSE

The MSMQ Service deletes all empty message files for recoverable and transactional messages upon startup. Recoverable and transactional message storage files are paired and are of the form Lnnnnnnn.MQ and Pnnnnnnnn.MQ or Jnnnnnnn.MQ. For more details on storage directory files, please see the following article in the Microsoft Knowledge Base:

Q174307 INFO: Interpreting File Names in the Storage Directory

If you do not restart the MSMQ Service, the disk storage usage remains at the peak requirement since the last restart of the MSMQ Service.


RESOLUTION

The following fix installs a periodic cleanup of empty MSMQ message files. The default interval for cleanup is six hours. This interval can be modified by a new registry key. To change the default interval, you must add MessageCleanupInterval to the registry.

WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

For information about how to edit the registry, view the "Changing Keys And Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT, you should also update your Emergency Repair Disk (ERD).

  1. Start Registry Editor (REGEDT32.EXE).


  2. Locate and select the following registry subkey:


  3. 
    HKEY_LOCAL_MACHINE\ Software\Microsoft\MSMQ\Parameters 
  4. From the Edit menu, click ADD VALUE.


  5. In the Value Name Field, type MessageCleanupInterval.


  6. In the Data Type Field, select REG_DWORD.


  7. For the data value, enter the desired interval in milliseconds (for example, 3600000 (decimal) for one hour).


  8. Exit Registry Editor to save the changes.


The next time you restart the MSMQ Service the new interval will be used to cleanup empty message files.


STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug was corrected in Windows NT 4.0, Service Pack 4.


REFERENCES

MSMQ Administrators Guide; topic: Message Delivery;

Additional query words:

Keywords : kbMSMQ100fix
Version : winnt:1.0
Platform : winnt
Issue type : kbprb


Last Reviewed: January 22, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.