Re: cscript errors when running many concurrent vbs scripts



Michael Grove wrote:
> hi,
>
> i have a java application that spawns cscript to run a simple vbs
> script that uses wmi to connect to another computer and retrieve
> properties of Win32_OperatingSystem. it's a multi-threaded app and
> might make ~50 of these calls concurrently to different systems. i
> find that when many concurrent calls are made some of the cscript
> invocations will fail in the following ways:
>
> * exit code -1073741502, no stdout/stderr
> * exit code 1, no stdout/stderr
> * exit code 1, stdout = CScript Error: Initialization of the Windows
> Script Host failed. (Class does not exist. )
> * exit code 1, stdout = CScript Error: Initialization of the Windows
> Script Host failed. (Not enough storage is available to complete this
> operation.) * exit code 128, no stdout/stderr
>


In a generic sense, it would seem to be an often encountered problem in
different scenarios given so many google hits. Maybe sifting thru these may
shed some light on your problem and a possible solution (which I don't
personally have)...

Not enough storage is available to complete this operation - Google Search
http://www.google.com/search?q=Not%20enough%20storage%20is%20available%20to%20complete%20this%20operation&num=100&scoring=d


> i don't have any problems when i limit the number of simultaneous
> calls to a smaller number, say 10. i haven't seen any correlation
> between specific target machines and these cscript errors - it's
> pretty random which cscript invocations will fail in this manner. the
> system has plenty of memory available.
>
> because of these problems, and others (best not to spawn lots of
> processes from java), i'm looking into writing a c++ dll that makes
> the identical queries, which i'll invoke from java through jni. i'm
> hoping this will avoid these errors. having some trouble getting the
> c++ code to work remotely (the c# equivalent of the vbs script works
> great, haven't quite figured out the right combination of flags to
> get things working from c++), so i thought i'd ask if there was a
> simple workaround to these cscript errors i'm seeing that doesn't
> involve throttling the number of concurrent requests. i've seen some
> other newsgroup posts on this topic (cscript errors when running many
> concurrent vbs scripts) without a solution, but thought i'd ask.
>
> thanks.
>
> -mike

--
Michael Harris
Microsoft MVP Scripting




.



Relevant Pages

  • RE: Using SMS to install network printers
    ... - When it spawns it has to have appropriate rights. ... directory from a command line and run the batch file. ... You might have to tweak your script a bit for error ... > cscript SCRIPTNAME.VBS ...
    (microsoft.public.sms.misc)
  • Re: Perfmon script not working??
    ... I had perfmon call a bat file with (cscript ... | I'm trying to monitor free disk space using Performance Monitor. ... | free space falls below a certain value I have an email.vbs script I ... | An alert was created on Windows 2003 server using the Logical Disk ...
    (microsoft.public.win2000.general)
  • Re: Anonymous works 1 Day ??
    ... If you run CSCRIPT //h:CSCRIPT that will set CSCRIPT as the default script ... This right is needed for IIS to logon the anonymous user though. ...
    (microsoft.public.inetserver.iis.security)
  • RE: VBScript in SQL Server Agent/Jobs not working
    ... Basically, Windows Scripting Host has two script calling executibles, WScript ... the .VBS or .JS extension and call it with WScript or CScript. ...
    (microsoft.public.sqlserver.server)
  • RE: pass variable from DOS to VBS
    ... cscript /nologo pwdset.vbs %1 ... this will send the value of %1 as argument to VBS file. ... oUser.Put "pwdLastSet", CLng ... You can learn more about VBScripting at Microsoft Technet Script Center ...
    (microsoft.public.scripting.vbscript)