You receive "insufficient resources" error messages when the amount of allocated memory that is being used to store messages in Message Queuing 2.0 exceeds an amount that is between 1.6 GB and 1.8 GB (899613)
The information in this article applies to:
- Microsoft Message Queue Server (MSMQ) 2.0
SYMPTOMSWhen you send a message to a queue, Microsoft Message
Queuing does not accept the message that you are sending. Instead, Message
Queuing generates an "insufficient resources" error message. You receive this
error message in the application that is using Microsoft Message Queuing 2.0 to
send messages. When this problem occurs, the following information may
appear in the stack trace of a Microsoft .NET Framework service or application:
Exception Type:
System.Messaging.MessageQueueException MessageQueueErrorCode:
InsufficientResources Message: Insufficient resources to perform
operation. ErrorCode: -2147467259 TargetSite: Void
SendInternal(System.Object, System.Messaging.MessageQueueTransaction,
System.Messaging.MessageQueueTransactionType) HelpLink: NULL Source:
System.Messaging Additionally, the following message is logged in the
Application log: Event Type:
MQ_ERROR_INSUFFICIENT_RESOURCES There are insufficient resources to perform the
operation. Event ID: 2085 Date:
<Date><Time>User: N/A Computer:
ComputerNameDescription: Unable to create
message file C:\WINNT\System32\msmq\STORAGE\l0000009.mq. There is insufficient
disk space or memory.In a Microsoft COM+ Queued Component (QC)
application, the following message may be logged in the Application
log:Event Type: Error Event Source: COM+
Event Category: QC Recorder Event ID: 4216 Date:
<Date>Time:
<Time>User: N/A Computer:
ComputerNameDescription: An unexpected error
was returned by the MSMQ API function indicated. The following error message
was retrieved from MSMQ. MQSendMessage: There are insufficient resources to
perform the operation. Server Application ID:
{A3551518-9BFB-46BA-8F3B-2218CDA17821} Server Application Name: Logger
Error Code = 0xc00e0027 COM+ Services Internals Information: File:
.\channelmanager.cpp, Line: 366This issue occurs when the following
conditions are true:
- You try to send a message in Message Queuing.
- The allocated memory that is currently being used to run
the service and to store messages has reached 2 gigabytes (GB). By default,
Microsoft Windows 2000 allocates 2 GB of addressable memory to a
process.
After the Message Queuing service loads, the default amount
of allocated memory that is available to Message Queuing 2.0 to store messages
is between 1.6 GB and 1.8 GB.
Note If you use the 3GB switch, the allocated memory will be between 2 GB and 2.5
GB.
Message storage files are memory-mapped files. Therefore, you can
see whether the limit has been exceeded by checking the size of the MSMQ
Storage folder. This folder is typically located in the %WinDir%\System32\MSMQ
Storage folder. However, the storage folder can be configured for another
location. To see whether the storage folder has been configured for another
location, look in the Message Files Folder field on
Storage tab in the MSMQ tool in Control Panel.
CAUSEThis problem occurs for one or more of the following
reasons:
- The application that reads and processes the messages that
arrive in the queues is experiencing difficulties. However, messages continue
to arrive in the queues at a faster rate than the rate at which the application
can read and process the messages.
- Journaling is enabled in the queues. However, the data that
causes messages to accumulate has not been deleted.
- Deadlettering is enabled in the queues. Additionally, the
amount of allocated memory that is available to store deadlettered messages has
been reached or exceeded.
- Messages have accumulated in the outgoing queue because the
destination queue is unavailable.
RESOLUTIONThe method that you use to resolve this problem depends on
the current status of the Message Queuing service. Before you can resolve this
problem, you must stop the services or applications that are writing to the
queues. If Message Queuing is runningDetermine which queues have accumulated messages. To do this, use
one of the following methods:
- Manually examine the queues by using the Message Queuing
interface. The Message Queuing interface is located in the Computer Management
console.
- In Performance Monitor, set all the counters on the MSMQ QUEUE performance object. Then, select Report view. In
Report view, you can see the number of messages in each
queue.
After you have determined which queues have accumulated
messages, you must determine why the messages have accumulated. There are
several possible reasons why messages might accumulate in the queues. These
reasons include the following:
- The messages that are in the outgoing message queue cannot
reach their destinations. If the messages cannot reach their destinations, make
sure that the destination computer is available to receive messages. If these
messages are outdated or have no value, clear the queue.
- The application that should be receiving messages has
stopped or has entered an error condition. If one of these conditions is true,
resolve the problem in that application.
- The messages in the dead letter queues or in the journal
queues have been retained. These messages have not been removed or processed.
If these messages have been retained, determine the purpose for retaining these
messages. The option to journal messages is frequently used for testing. When
testing is completed, this option may be unintentionally left enabled. If the
messages are deadlettered, the messages have not been processed or delivered
within a specified time. If deadlettering or journaling is turned on, a process
should be reading these messages out of the queue.
When you have identified the queues where messages have
accumulated, you can delete the accumulated messages. If Message Queuing is not running and you cannot manually start itNote Before you make any changes to the files in the MSMQ Storage
folder, we recommend that you back up the current Message Queuing environment
by using MQbkup.exe. This step is very important if you need help from Product
Support Services. Note Because Message Queuing has entered an unstable state, you may
not be able to recover all the messages. If you experience difficulties
restoring messages by using the following steps, and the data is very
important, contact Product Support Services for help. To back up the
Message Queuing configuration by using MQbkup.exe, follow these
steps. Note Before you run MQbkup.exe, select a folder to which you will back
up the Message Queuing files. This folder must be located on a disk that has at
least 2.5 GB of available space.
- Open a Command Prompt window.
- Change the directory to %WinDir%\System32.
- Run the following command:
MQbkup.exe -b Drive:\Folder to Put Backup Files - Note the location of the folder to which you backed up the
Message Queuing files.
Start the server by using the 3GB switchNote The 3GB switch is only an option for Microsoft Windows 2000 Advanced
Server. For Microsoft Windows 2000 Server and for Microsoft Windows 2000
Professional, go to the "To manually recover your messages"
section. By default, Windows 2000 allocates 2 GB of addressable memory
to each process. This problem occurs because Message Queuing uses the whole
allocation. This behavior prevents the service from correctly restarting. If
you use the 3GB switch, Windows 2000 Advanced Server allocates 3 GB of
addressable memory to each process. This configuration gives Message Queuing
sufficient addressable memory to load the service and the message storage files
after you restart the server. This switch increases Message Queuing storage to
between 2 GB and 2.5 GB. Warning This configuration may affect other resources on the server. We
recommend that you remove the 3GB switch after you have completed troubleshooting. This
configuration is not intended to permanently resolve the problem. However, you
can use this configuration to access Message Queuing so that you can perform
the steps in the "If Message Queuing is running" section. For
information about how to configure Windows to run by using the 3GB switch, see the "Enabling application memory tuning support in
your applications" topic in the Windows 2000 Help file. To manually recover your messagesNote Follow these steps only if Message Queuing is in a non-running
state. Important Because Message Queuing is in an unstable state and will not
start, you may not be able to recover all the messages. Warning This process may cause an application to receive transactional
messages in a different order from the order in which the messages originally
arrived.
- Create a temporary folder to hold your message storage
files. Do not put this folder in the MSMQ folder.
- Select only the files that have the .mq file name
extension.
Warning Some files that are located in the MSMQ Storage folder are
critical for Message Queuing to correctly run. Make sure that you select only
the files that have the .mq file name extension. - Move the selected files to the folder that you created in
step 1.
- Make sure that the Message Queuing Data Access Driver is
not started. To do this, run the following command at a command prompt:
- Start the Message Queuing service. To do this, run the
following command at the command prompt: Note If the data in the messages is not important, and you only want
to bring Message Queuing back online, you can stop here.
- After you have verified that the service will now start,
stop the service. To do this, run the following command at the command prompt: This command stops both the Message Queuing service
and the Data Access driver.
- In the folder to which you moved the message storage files
in step 5, notice that some file names have a
pNumber.mq format and some file names have an
lNumber.mq format. These files are stored as pairs.
Each p file has a corresponding l file.
Notice the dates that the
files were modified. Select the oldest p file and the corresponding l file.
Move these files to the original MSMQ Storage folder. - Run the command in step 5 to start the Message Queuing
service. If the service starts, follow the steps in the "If Message Queuing is
running" section to determine in which queues the messages are accumulating and
how to handle the messages.
- After you have removed the accumulating messages from the
queues, repeat steps 6 through 8 until you have returned all message files to
the MSMQ Storage folder and you have removed all accumulating messages from the
queues.
Note Do not move more than 1.6 GB of data back into the MSMQ Storage
folder at the same time. If you do this, the service may not start.
REFERENCESFor more information about the Message Queuing resource,
visit the following Microsoft Web site:
Modification Type: | Major | Last Reviewed: | 2/17/2006 |
---|
Keywords: | kbprb KB899613 kbAudDeveloper |
---|
|