用于启动排队 COM 的 VBScript应用程序 - 泄漏内存

发布于 2024-10-14 23:20:35 字数 640 浏览 4 评论 0原文

我有一个简单的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

锦爱 2024-10-21 23:20:35

我认为你需要:

Set app = Nothing
Set apps = Nothing
Set cat = Nothing

在脚本的末尾。

有关如何使用的示例,请参阅 http://support.microsoft.com/kb/304713 COMAdmin.COMAdminCatalog 对象。

I think you need:

Set app = Nothing
Set apps = Nothing
Set cat = Nothing

at the end of your script.

See http://support.microsoft.com/kb/304713 for an example of how to use the COMAdmin.COMAdminCatalog object.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文