用于启动排队 COM 的 VBScript应用程序 - 泄漏内存
我有一个简单的 VBScript,它遍历所有 COM+ 应用程序并启动排队的应用程序。该活动每半小时运行一次。我的服务器有 2.5GB 内存。然后大约 3 天之后,我从 Windows Script Host 收到“内存不足”错误。不过,服务器内存似乎没问题。大约 1GB 免费。
这就是我的脚本的样子;
dim cat
Dim apps
Dim app
set cat = CreateObject ("COMAdmin.COMAdminCatalog")
set apps = cat.getcollection("Applications")
apps.populate
for each app in apps
if app.Value("QueuingEnabled") then
cat.StartApplication (app.name)
end if
next
上次我收到此错误时,它报告了第 7 行; 将 apps = cat.getcollection("Applications")
设置为内存不足的位置。有人对如何解决这个问题有任何建议吗?我对 COM+ 的经验很少,所以我很难看出什么在消耗内存。服务器上只运行了大约 8 个 COM+ 应用程序,而且它们并不大。
任何帮助将不胜感激。
I have a simple VBScript that's iterating through all COM+ apps and starting the ones that are queued. This runs every half hour. My server has 2.5gb of memory. Then after about 3 full days of this, I get an "Out of memory" error from Windows Script Host. However, it seems the server memory is fine. Around 1gb free.
This is what my script looks like;
dim cat
Dim apps
Dim app
set cat = CreateObject ("COMAdmin.COMAdminCatalog")
set apps = cat.getcollection("Applications")
apps.populate
for each app in apps
if app.Value("QueuingEnabled") then
cat.StartApplication (app.name)
end if
next
Last time I got this error it reported line #7; set apps = cat.getcollection("Applications")
as the place it ran out of memory. Does anyone have any suggestions on how to fix this problem? I have very little experience with COM+, so it's hard for me to see what's consuming memory here. There are only about 8 COM+ apps running on the server, and they are not at all large.
Any help here would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为你需要:
在脚本的末尾。
有关如何使用的示例,请参阅 http://support.microsoft.com/kb/304713 COMAdmin.COMAdminCatalog 对象。
I think you need:
at the end of your script.
See http://support.microsoft.com/kb/304713 for an example of how to use the COMAdmin.COMAdminCatalog object.