Author Topic: InitInstance Error  (Read 2457 times)

JTaylor

  • Pundit
  • *****
  • Posts: 748
    • Data & Stuff Inc.
InitInstance Error
« on: September 21, 2015, 03:19:12 pm »
I've started getting the following in a project I'm working on.  Nothing shows in the ErrorLog...I assume because it never gets to a point it can write an error.   Can't find anything in the Help File or TechDatabase.  What causes such an error?

Jim

Code: HTML5
<H1>WebBatch Error</H1>
<Pre>
Batch DLL initialization error

Err num 37
</Pre>
<HR>
Content-type: text/html

<H1>WebBatch Error</H1>
<Pre>
WebBatch Error

InitInstance failed
</Pre>
<HR>

 

JTaylor

  • Pundit
  • *****
  • Posts: 748
    • Data & Stuff Inc.
Re: InitInstance Error
« Reply #1 on: September 21, 2015, 03:39:19 pm »
I also get this instead sometimes.

Code: HTML5

<H1>WebBatch Error</H1>
<Pre>
WebBatch Error

InitApplication failed
</Pre>
<HR>

 

JTaylor

  • Pundit
  • *****
  • Posts: 748
    • Data & Stuff Inc.
Re: InitInstance Error
« Reply #2 on: September 21, 2015, 03:41:45 pm »
A bit more info.  I am making about 30 requests very close to each other.  Wouldn't think that would overpower WebBatch though.

Jim

td

  • Tech Support
  • *****
  • Posts: 2137
    • WinBatch
Re: InitInstance Error
« Reply #3 on: September 22, 2015, 07:57:54 am »
As the error log implies, the WIL interpreter DLL or WebBatch main process is failing during early initialization.  The error number tells us were it is failing ( in a Win32 API call) but not why.  If WebBatch sometimes works on your system, the best guess on the cause is a  race condition in the OS's Win32 API.    If WebBatch always fails with this error even in low demand situations then your system is sick. 

Assuming that the cause is a race condition, you may want to examine your Web server's configuration settings for something that would address CGI instance startup or some other CGI related setting that might address the problem.
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates


JTaylor

  • Pundit
  • *****
  • Posts: 748
    • Data & Stuff Inc.
Re: InitInstance Error
« Reply #4 on: September 22, 2015, 08:26:15 am »
I have been running WebBatch for years on this server with no problem.  Nothing has changed recently except I upgraded WebBatch, apart from, perhaps, Windows Updates.

Jim

JTaylor

  • Pundit
  • *****
  • Posts: 748
    • Data & Stuff Inc.
Re: InitInstance Error
« Reply #5 on: September 22, 2015, 09:14:01 am »
Any suggestions for where to look?  I'm running Windows Web Server 2008 with IIS 7.0.    I've looked through every setting option that looks related in IIS and that has not helped.   Nothing I'm finding in web searches seems to apply but maybe my search terms are incorrect.   Found some things related to fast-cgi but I don't think  webbatch uses fast-cgi, does it?   Pretty much everything I find related to race conditions is tied to PHP.

Jim

td

  • Tech Support
  • *****
  • Posts: 2137
    • WinBatch
Re: InitInstance Error
« Reply #6 on: September 22, 2015, 10:33:04 am »
There have been no remotely recent changes in WebBatch or the DLL that could cause this problem.   And both our Tech Database and Commerce server run WebBatch with FastCGI. 

Windows updates sound suspicious but that is only speculation.  MSFT seems to screw up something for somebody with almost every round of updates.
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates


JTaylor

  • Pundit
  • *****
  • Posts: 748
    • Data & Stuff Inc.
Re: InitInstance Error
« Reply #7 on: September 22, 2015, 12:17:51 pm »
Didn't really figure the WebBatch update caused the problem but that was the only recent change and I try to provide full-disclosure.   Wondering if the multiple database connection calls are the issue???   I'm looking at MYSQL 5.7 which has a built-in webservice so I can avoid the 30 connection calls.  That may fix the problem?   

I don't see fast-cgi mentioned in the WebBatch help...is that just the standard setup I would have done or do I need to change something in IIS?  Would that be a recommended change?

Jim

td

  • Tech Support
  • *****
  • Posts: 2137
    • WinBatch
Re: InitInstance Error
« Reply #8 on: September 22, 2015, 01:58:10 pm »
Didn't really figure the WebBatch update caused the problem but that was the only recent change and I try to provide full-disclosure.   Wondering if the multiple database connection calls are the issue???
 

Hard to say.   On the surface the the problem as presented would seem to be some kind of Windows kernel bug or kernel resource limitation but that is based on a fairly limited understanding of all the factors involved.  And this is not an attempt to pass the blame.  It simply what the available evidence points to at this time.  The actual cause may be something completely different.

Quote
I'm looking at MYSQL 5.7 which has a built-in webservice so I can avoid the 30 connection calls.  That may fix the problem?   

It very well may, if it reduces the number of consecutive calls to start a new WebBatch process and the problem is kernel resource related.

Quote
I don't see fast-cgi mentioned in the WebBatch help...is that just the standard setup I would have done or do I need to change something in IIS?  Would that be a recommended change?

Yes, you need to create a handler mapping for *.web files with FastCgiModule as the module and webbatch.exe as the exe for your site. MSFT recommends using FastCGI.  You can find step by step tutorials for setting up FastCGI  on numerous sites, include MSFT's.  WebBatch does not require anything special with regard to  FastCGI setup.
"Success is a lousy teacher. It seduces smart people into thinking they can't lose."
  - Bill Gates