Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inactive or incorrectly terminated Excel process images
Situation: Inactive or incorrectly terminated Excel process images accumulate
on server Anyone out there with knowledge/advice on how to access a hung(?) instance of Excel and pull information about the calling event or anything else that may help identify the root cause? Any auditing techniques out there that can record such events? Your help much appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inactive or incorrectly terminated Excel process images
Nothing simple that I know of. Do you have code that creates instances of
Excel (through C++, C#, VB, VBA)? If the developer does not close the inststance prior to setting the object to Nothing then the instance will be stuck... dim objXL as object set objXl = CreateObject("Excel.Application") 'do some stuff objXL.close 'necessary to remove the instance of Excel set objXl = nothing -- HTH... Jim Thomlinson "JB2005" wrote: Situation: Inactive or incorrectly terminated Excel process images accumulate on server Anyone out there with knowledge/advice on how to access a hung(?) instance of Excel and pull information about the calling event or anything else that may help identify the root cause? Any auditing techniques out there that can record such events? Your help much appreciated. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inactive or incorrectly terminated Excel process images
Rogue code is our chief suspect, but we're experiencing difficulties in
identifying candidates... "Jim Thomlinson" wrote: Nothing simple that I know of. Do you have code that creates instances of Excel (through C++, C#, VB, VBA)? If the developer does not close the inststance prior to setting the object to Nothing then the instance will be stuck... dim objXL as object set objXl = CreateObject("Excel.Application") 'do some stuff objXL.close 'necessary to remove the instance of Excel set objXl = nothing -- HTH... Jim Thomlinson "JB2005" wrote: Situation: Inactive or incorrectly terminated Excel process images accumulate on server Anyone out there with knowledge/advice on how to access a hung(?) instance of Excel and pull information about the calling event or anything else that may help identify the root cause? Any auditing techniques out there that can record such events? Your help much appreciated. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inactive or incorrectly terminated Excel process images
It's like asking a bunch of kids who made the mess. The mess is obvious, but
who made the mess is not... I wish I could help. -- HTH... Jim Thomlinson "JB2005" wrote: Rogue code is our chief suspect, but we're experiencing difficulties in identifying candidates... "Jim Thomlinson" wrote: Nothing simple that I know of. Do you have code that creates instances of Excel (through C++, C#, VB, VBA)? If the developer does not close the inststance prior to setting the object to Nothing then the instance will be stuck... dim objXL as object set objXl = CreateObject("Excel.Application") 'do some stuff objXL.close 'necessary to remove the instance of Excel set objXl = nothing -- HTH... Jim Thomlinson "JB2005" wrote: Situation: Inactive or incorrectly terminated Excel process images accumulate on server Anyone out there with knowledge/advice on how to access a hung(?) instance of Excel and pull information about the calling event or anything else that may help identify the root cause? Any auditing techniques out there that can record such events? Your help much appreciated. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inactive or incorrectly terminated Excel process images
Hi JB,
This is why MS doesn't advocate running Excel on a server. It's too easy to leave orphaned instances hanging around, which, as you know, will cause problems as they chew up more and more memory. One thing you can try is to execute this vbscript code: ShowExcelApp Sub ShowExcelApp() Dim obj Set obj = GetObject(, "Excel.Application") obj.Visible = True Set obj = Nothing End Sub Just put this code in a text file and name it getexcel.vbs. You should then be able to execute it on the server with wscript or maybe by double-clicking the icon. It should grab one orphaned instance and make it visible, thus enabling you to see what state the application is in. Likely, you'll see that an unanswered error message or prompt is keeping Excel from closing. -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] JB2005 wrote: Situation: Inactive or incorrectly terminated Excel process images accumulate on server Anyone out there with knowledge/advice on how to access a hung(?) instance of Excel and pull information about the calling event or anything else that may help identify the root cause? Any auditing techniques out there that can record such events? Your help much appreciated. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inactive or incorrectly terminated Excel process images
Does that grab an orphaned instance or does it grab any instance orphaned or
not...What happens if you grab an active instance? Just idle curiosity on my part... -- HTH... Jim Thomlinson "Jake Marx" wrote: Hi JB, This is why MS doesn't advocate running Excel on a server. It's too easy to leave orphaned instances hanging around, which, as you know, will cause problems as they chew up more and more memory. One thing you can try is to execute this vbscript code: ShowExcelApp Sub ShowExcelApp() Dim obj Set obj = GetObject(, "Excel.Application") obj.Visible = True Set obj = Nothing End Sub Just put this code in a text file and name it getexcel.vbs. You should then be able to execute it on the server with wscript or maybe by double-clicking the icon. It should grab one orphaned instance and make it visible, thus enabling you to see what state the application is in. Likely, you'll see that an unanswered error message or prompt is keeping Excel from closing. -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] JB2005 wrote: Situation: Inactive or incorrectly terminated Excel process images accumulate on server Anyone out there with knowledge/advice on how to access a hung(?) instance of Excel and pull information about the calling event or anything else that may help identify the root cause? Any auditing techniques out there that can record such events? Your help much appreciated. |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inactive or incorrectly terminated Excel process images
Jim,
That will grab any instance. I'm not sure what determines which instance is "next" in the order. Keep in mind that Windows (or Excel for that matter) doesn't know that a particular instance of Excel is orphaned. Probably best to run this script during a slow time of day so the chances are good that the instance shown will be one that's orphaned. I'm sure that with the Windows API you could enumerate the current processes, find ones named EXCEL.EXE, look for the longest running one, and then activate and show the application window that corresponds to it. But that's a lot tougher than a call to GetObject. <g -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] Jim Thomlinson wrote: Does that grab an orphaned instance or does it grab any instance orphaned or not...What happens if you grab an active instance? Just idle curiosity on my part... Hi JB, This is why MS doesn't advocate running Excel on a server. It's too easy to leave orphaned instances hanging around, which, as you know, will cause problems as they chew up more and more memory. One thing you can try is to execute this vbscript code: ShowExcelApp Sub ShowExcelApp() Dim obj Set obj = GetObject(, "Excel.Application") obj.Visible = True Set obj = Nothing End Sub Just put this code in a text file and name it getexcel.vbs. You should then be able to execute it on the server with wscript or maybe by double-clicking the icon. It should grab one orphaned instance and make it visible, thus enabling you to see what state the application is in. Likely, you'll see that an unanswered error message or prompt is keeping Excel from closing. -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] JB2005 wrote: Situation: Inactive or incorrectly terminated Excel process images accumulate on server Anyone out there with knowledge/advice on how to access a hung(?) instance of Excel and pull information about the calling event or anything else that may help identify the root cause? Any auditing techniques out there that can record such events? Your help much appreciated. |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inactive or incorrectly terminated Excel process images
You best bet is to fix the dodgy code, but as Jake pointed, excel is not
supposed to be run like this. Probably due to the use of unqualified object that are not released, so error state not properly handled. Process Explorer from SysInternals will tell you which files are being used by each Excel instance. may help track down the culprit. If you feel you want to automate it, rather than actually fix the cause: http://www.thescarms.com/vbasic/StopProcess.asp NickHK "JB2005" wrote in message ... Situation: Inactive or incorrectly terminated Excel process images accumulate on server Anyone out there with knowledge/advice on how to access a hung(?) instance of Excel and pull information about the calling event or anything else that may help identify the root cause? Any auditing techniques out there that can record such events? Your help much appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can password be removed on Excel WS from terminated employee? | Excel Discussion (Misc queries) | |||
How to count process running time ( process not finished) | Excel Programming | |||
How to count process running time ( process not finished) | Excel Programming | |||
Excel.exe not terminated after spreadsheet saved | Excel Programming | |||
Excel Process is not terminated when using C# and com Interrop | Excel Programming |