Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Maximum Number of Concurrent cscript.exe at Any One Time

185 views
Skip to first unread message

Spencer

unread,
Sep 2, 2008, 2:29:34 PM9/2/08
to stab...@wbmi.com
We leverage ControlM as our scheduling tool to kick off jobs on our
Windows 2003 Server. We have noticed that there seems to be an upper
limit regarding the number of concurrent cscript.exe that will run at
any point in time under a single users account. We get a return code
of 1 back and nothing else returned to stdout. Not even the header
declaring what version of WSH we are running and the Microsoft
copyright information. It simply fails immediately prior to executing
any of the script. The same script gets executed around 100 times a
day or so and it seems when we have somewhere around 20+ cscript.exe
executing all of a sudden we can't execute anymore and we get
failures. I am positive there isn't an error in the script and am
most certain that this is something to do with a maximum number of
vbscripts executing at a single time. I see no error messages in the
event log or anywhere else. The script is a simple vbscript and we
run it using the cscript. I have found some vague references to
limits and similar problems that others have had regarding this but I
have found no solution. I am looking for a solution and hopefully it
doesn't involve re-writting my vbs to a bat file. We need to get this
fixed asap due to the random nature of the failures and the production
impact.
Spencer

Pegasus (MVP)

unread,
Sep 2, 2008, 4:44:48 PM9/2/08
to

"Spencer" <spe...@tabbert.net> wrote in message
news:9deb9e58-8ca1-4d69...@l64g2000hse.googlegroups.com...

I think you need to dig a little deeper. To prove/disprove your theory, I
typed the following command from the Command Prompt:

for /L %a in (10,1,60) do "cmd /c start /b cscript //nologo test.vbs >>
test%a.txt"

As you probably know, it will launch 50 instances of test.vbs. This script
file contains the following lines:

wscript.echo Start time
wscript.sleep 120000
wscript.echo End time

Immediately after the command line had finished, I typed this command:

tasklist | find /i /c "cscript.exe"

As expected, I saw 50 instances of cscript.exe. Furthermore, after each
script had finished its run, each and every file "test%a.txt" contained two
lines: One with the time stamp of the start time, the other with the end
time stamp.


Pegasus (MVP)

unread,
Sep 2, 2008, 4:45:59 PM9/2/08
to

"Spencer" <spe...@tabbert.net> wrote in message
news:9deb9e58-8ca1-4d69...@l64g2000hse.googlegroups.com...

Slight correction: I saw 51, not 50 concurrent cscript instances.


Al Dunbar

unread,
Sep 2, 2008, 10:01:22 PM9/2/08
to

"Pegasus (MVP)" <I....@fly.com.oz> wrote in message
news:ebOG8yTD...@TK2MSFTNGP03.phx.gbl...

Perhaps it also has something to do with the resources each instances makes
use of...

/Al


Spencer

unread,
Sep 3, 2008, 8:49:59 AM9/3/08
to
On Sep 2, 9:01 pm, "Al Dunbar" <AlanD...@hotmail.com.nospaam> wrote:
> "Pegasus (MVP)" <I....@fly.com.oz> wrote in message
>
> news:ebOG8yTD...@TK2MSFTNGP03.phx.gbl...
>
>
>
>
>
>
>
> > "Spencer" <spen...@tabbert.net> wrote in message
> /Al- Hide quoted text -
>
> - Show quoted text -

I did some further testing and logged onto the server myself and ran
30+ instances of the exact script that gets executed myself and had no
issues. This would cause issue immediately when running through
ControlM. I also downloaded Process Explorer from Microsoft and the
interesting thing that I see is that all these seperate instances of
the script running all tie back to a parent process. In the instance
of when I run after logging on I see that the parent process is
explorer. However when I look at the scripts that are being run by
ControlM they are running under a parent process p_ctmag.exe which is
the ControlM Agent. I really wonder if this executable somehow can
handle only a maximum number of threads running under it due to
limitations regarding Memory or something along those lines. Is this
possible at all? It seems odd to me that the parent process would
have anything to do with this but in process explorer you can see that
for each child process there are additional threads attached to the
parent process. Any other way to debug this?

Alex K. Angelopoulos at

unread,
Sep 3, 2008, 10:36:54 AM9/3/08
to

It could still be a resources issue, but it looks to me like this particular
application may be running into issues. Does it maintain connections with
all instances of the scripts?

I couldn't see their knowledgebase since they only open it to customers; you
may need to explore that side of this though. It's definitely not a problem
intrinsic to WSH. This actually may be some kind of a queuing issue for
Control-M that can be resolved by tuning the application.


"Spencer" <spe...@tabbert.net> wrote in message

news:2cbfd4e9-51b2-425d...@k37g2000hsf.googlegroups.com...


> On Sep 2, 9:01 pm, "Al Dunbar" <AlanD...@hotmail.com.nospaam> wrote:
>> "Pegasus (MVP)" <I....@fly.com.oz> wrote in message

> I did some further testing and logged onto the server myself and ran

Spencer

unread,
Sep 8, 2008, 3:44:20 PM9/8/08
to
On Sep 3, 9:36 am, "Alex K. Angelopoulos" <aka(at)mvps.org> wrote:
> It could still be a resources issue, but it looks to me like this particular
> application may be running into issues. Does it maintain connections with
> all instances of the scripts?
>
> I couldn't see their knowledgebase since they only open it to customers; you
> may need to explore that side of this though. It's definitely not a problem
> intrinsic to WSH. This actually may be some kind of a queuing issue for
> Control-M that can be resolved by tuning the application.
>
> "Spencer" <spen...@tabbert.net> wrote in message

>
> news:2cbfd4e9-51b2-425d...@k37g2000hsf.googlegroups.com...
>
>
>
> > On Sep 2, 9:01 pm, "Al Dunbar" <AlanD...@hotmail.com.nospaam> wrote:
> >> "Pegasus (MVP)" <I....@fly.com.oz> wrote in message
> > I did some further testing and logged onto the server myself and ran
> > 30+ instances of the exact script that gets executed myself and had no
> > issues.  This would cause issue immediately when running through
> > ControlM.  I also downloaded Process Explorer from Microsoft and the
> > interesting thing that I see is that all these seperate instances of
> > the script running all tie back to a parent process.  In the instance
> > of when I run after logging on I see that the parent process is
> > explorer.  However when I look at the scripts that are being run by
> > ControlM they are running under a parent process p_ctmag.exe which is
> > the ControlM Agent.  I really wonder if this executable somehow can
> > handle only a maximum number of threads running under it due to
> > limitations regarding Memory or something along those lines.  Is this
> > possible at all?  It seems odd to me that the parent process would
> > have anything to do with this but in process explorer you can see that
> > for each child process there are additional threads attached to the
> > parent process.  Any other way to debug this?- Hide quoted text -

>
> - Show quoted text -

Well I decided to scrap the effort on the .vbs script and rewrite it
in good ol' dos batch scripting. Can't beat parsing text files in
dos..sure is fun. Anyways I am not sure what the problem is but we
continue to have it. I also noticed the following items in the event
viewer on Friday when we had some additional errors.

Event Type: Information
Event Source: Application Popup
Event Category: None
Event ID: 26
Description:
Application popup: CScript.exe - Application Error : The application
failed to initialize properly (0xc0000142). Click on OK to terminate
the application.

toni...@gmail.com

unread,
Feb 20, 2014, 8:20:41 AM2/20/14
to
Hi, i encounter this problem with vbs executed by controlM.

ControlM was unable to launch more than 3 cscript at the same time.
to resolv this i configure the ControlM Agent in "Logon As User" mode

Hope this help

mike.j...@gmail.com

unread,
Apr 18, 2014, 3:16:45 PM4/18/14
to
On Thursday, 20 February 2014 13:20:41 UTC, toni...@gmail.com wrote:
> Hi, i encounter this problem with vbs executed by controlM.
> Hope this help

Nearly 7 years later...

0 new messages