(MSMQ) mqsvc.exe 不释放内存
嗨, 全部。
首先,请原谅以下描述中的任何英语语言错误,因为,我不是母语人士,而且我无法完美地写出它。
我正在尝试创建一个 .NET (4.0) 服务,用于远程/事务/异步接收来自多个队列的可恢复消息。因此,首先,我在 TransactionScope 中使用 BeginPeek 方法,然后使用 Receive 方法(隐式使用 MSDTC)。
问题是运行我的服务的主机 (win7/2k8r2 sp1) 的 mqsvc.exe,它不执行任何其他操作(当然也与消息的接收/托管无关,MSMQ 是空的且干净的)。 mqsvc.exe 内存分配不断增长,并且从不释放任何内存。所有有关缓存清理间隔的 MSMQ 注册表项都有一个较短的时间值(大约 1 分钟)。
我尝试了几种选择:
- 使用本地和远程 MSDTC(远程显然是消息的主机)。
- 使用 COM 库 mqoa.dll 而不是 .NET,为 MSMQ 使用显式 MSDTC 事务。
- 与几个不同的机器(所有win7/2k8r2 sp1)。
我的服务执行时没有任何异常,并且我可以关闭或/和处置的所有资源都会尽快关闭/处置。我的服务的内存分配是稳定的。
在所有情况下,都是同样的问题。怎么解决呢?
提前致谢。
文森特.
Hi, all.
First of all, please excuse any english language mistakes in the following description, because, I'm not a native speaker and well, I can't write it perfectly.
I'm trying to create a .NET (4.0) service for remote/transactional/asynchronous reception of recoverable messages from several queues. So, first, I use BeginPeek method and then Receive method in a TransactionScope (which implicitly uses MSDTC).
The problem is the mqsvc.exe of the host machine (win7/2k8r2 sp1) running my service, which does nothing else (and certainly nothing related to the reception/hosting of messages, MSMQ is empty and clean). mqsvc.exe memory allocation grows and it never releases any memory. All MSMQ registry keys about cache cleaning interval have a short time value (about 1 minute).
I tried several options :
- with local and remote MSDTC (remote with obviously the host machine of messages).
- with the COM library mqoa.dll instead of .NET to use explicit MSDTC transactions for MSMQ.
- with several different machines (all win7/2k8r2 sp1).
There are no exceptions at the execution of my service, and all resources that I can close or/and dispose are closed/disposed as soon as possible. The memory allocation of my service is stable.
In all cases, it's the same problem. How to solve it?
Thanks in advance.
Vincent.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
问题在MSDN上已解决。
MSDN 主题
Problem solved on MSDN.
MSDN Thread
以下修补程序可解决此问题:
对消息执行远程事务读取时,消息队列服务占用大量内存在 Windows 7 或 Windows Server 2008 R2 中排队 5.0 队列
The following hotfix addresses this problem:
High memory usage by the Message Queuing service when you perform a remote transactional read on a Message Queuing 5.0 queue in Windows 7 or in Windows Server 2008 R2