MSMQ: What can cause a "Insufficient resources to perform operation" error when receiving from a queue?
Asked Answered
H

6

37

MSMQ: What can cause a "Insufficient resources to perform operation" error when receiving from a queue?

At the time the queue only held 2,000 messages with each message being about 5KB in size.

Hanover answered 13/11, 2009 at 23:19 Comment(2)
You are likely leaking a resource (memory, handles, etc.).Wimple
I agree, handles is my bet. What OS?Myself
W
30

From John Breakwell's Blog there are eleven possibilities:

  1. The thread pool for the remote read is exhausted (MSMQ 2.0 only).
  2. The number of local callback threads is exceeded
  3. The volume of messages has exceeded what the system can handle (MSMQ 2.0 only).
  4. Paged-pool kernel memory is exhausted.
  5. Mismatched binaries.
  6. The message size is too large.
  7. The machine quota has been exceeded.
  8. Routing problems when opening a transactional foreign queue (MSMQ 3.0 only)
  9. Lack of disk space.
  10. Storage problems on mobile devices
  11. Clustering too many MSMQ resources
  12. Too many open connections
  13. Computer name was longer than 15 characters
  14. Too many messages in the dead letter queue

http://blogs.msdn.com/johnbreakwell/archive/2006/09/18/761035.aspx

I would check the version of your queue and the amount of connections (to and from) your queue open at the time of error. Any of those "could have" caused your error.

W answered 13/11, 2009 at 23:24 Comment(4)
It was the number of open connections. There was a bug where it would open connections in a loop and never close them.Hanover
What exactly is considered a "connection" to to the queue? I am working with the .NET managed API for message queuing, and the MSDN docs never mention the concept of 'connections.'Polard
In .NET, each MessageQueue object is considered a connection, so you need to Dispose them.Hanover
That link is broken. Use learn.microsoft.com/en-us/archive/blogs/johnbreakwell/…Antibiosis
D
38

I had the same error message and the solution was simple.

There were a lot of messages sitting on various queues, and the storage limits had been reached. I went to:

  • Server Manager -> Features

  • Right clicked on Message Queuing

  • Selected properties

  • In the General tab un-ticked the storage limits

I was informed that services using MSMQ would be re-started, and then the error went away.

Dionisio answered 21/1, 2014 at 11:39 Comment(3)
Good instructions. Although I would still set a limit ... leaving it to become as "large as possible" gives the risk of filling up your hard drive. That might in turn cause even more severe errors than msmq's "Invalid resources to perform operation".Equiprobable
True, though it's very easy to monitor hard drive space, and an IT department won't have to know about any other limits to be aware of.Dionisio
also accessible via Computer Managment -> Message Queuing, right click -> PropertiesStirk
W
30

From John Breakwell's Blog there are eleven possibilities:

  1. The thread pool for the remote read is exhausted (MSMQ 2.0 only).
  2. The number of local callback threads is exceeded
  3. The volume of messages has exceeded what the system can handle (MSMQ 2.0 only).
  4. Paged-pool kernel memory is exhausted.
  5. Mismatched binaries.
  6. The message size is too large.
  7. The machine quota has been exceeded.
  8. Routing problems when opening a transactional foreign queue (MSMQ 3.0 only)
  9. Lack of disk space.
  10. Storage problems on mobile devices
  11. Clustering too many MSMQ resources
  12. Too many open connections
  13. Computer name was longer than 15 characters
  14. Too many messages in the dead letter queue

http://blogs.msdn.com/johnbreakwell/archive/2006/09/18/761035.aspx

I would check the version of your queue and the amount of connections (to and from) your queue open at the time of error. Any of those "could have" caused your error.

W answered 13/11, 2009 at 23:24 Comment(4)
It was the number of open connections. There was a bug where it would open connections in a loop and never close them.Hanover
What exactly is considered a "connection" to to the queue? I am working with the .NET managed API for message queuing, and the MSDN docs never mention the concept of 'connections.'Polard
In .NET, each MessageQueue object is considered a connection, so you need to Dispose them.Hanover
That link is broken. Use learn.microsoft.com/en-us/archive/blogs/johnbreakwell/…Antibiosis
C
18

I had too many failed messages in my outgoing queue. Check System Queues -> Dead-letter messages. I cleared this queue out and it worked fine again.

Circumambulate answered 10/4, 2014 at 13:28 Comment(1)
This solved the issue for me as well, except it was the "Transactional dead letter queue"Turner
A
4

If journaling is enabled, you will be storing copies of all messages removed from the queue, so you might also be hitting the MSMQ journal limit. Short term fix might be to purge the journals for the queue, longer term - disable journaling.

Acephalous answered 1/5, 2019 at 9:10 Comment(0)
M
1

I encountered the same error, after checking the things mentioned above it turned out that it was the computer name that was causing the issue! It was longer than 15 characters, after I changed it to a shorter one the issue was gone.

Melisma answered 12/9, 2018 at 7:28 Comment(0)
A
0

For me, the problem was not the machine that hosted the queue. It was the machine that was sending the message to the queue. I noticed that the "Outgoing Queues" on the source machine showed large numbers of messages, which led me to MSMQ Messages Are Stuck In The Outgoing Queue. Reinstalling MSMQ on the source machine is what fixed it for me.

Antibiosis answered 15/6, 2020 at 15:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.