Web Connection
COM Servers Unloading After Hit
Gravatar is a globally recognized avatar based on your email address. COM Servers Unloading After Hit
  kirk allen
  All
  Jun 6, 2018 @ 11:33am

Hello,

I recently upgraded from 5.72 ISAPI to 6.20 Net Handler and everything went smoothly except that now my COM servers unload unexpectedly after certain hits, but not every hit. I tried to track down why certain hits unload them and others don't, and I found a weird pattern. Whenever there is a call with a querystring involved, the servers unload. So whenever I call

myapp.myext?anyquerysting=x

the servers unload. This happens for both WCS expandscript and Web Control pages, and happens every time.

I thought that maybe the servers were unloading because of how the data from the querystring was used by my process methods, so, to further test, I added a querystring to a process method that doesn't expect or use data from a querystring and the servers still unload (i.e. my normal method is ShowHome.iso and I add a bogus querystring ShowHome.iso?junk=1 and the servers unload).

Any help would be appreciated!

Thanks, Kirk

Gravatar is a globally recognized avatar based on your email address. re: COM Servers Unloading After Hit
  Rick Strahl
  kirk allen
  Jun 7, 2018 @ 02:22am

Not much to go on with this. Needless to say this shouldn't happen and there's likely some sort of configuration issue. There's nothing about query strings that would suggest shutting down Web Connection servers.

Best to check wcerrors.txt in the temp folder to see if there's further information on any failures.

Even if your server is crashing in the Web Connection code the handler should capture the error and give you an error message and not just shut down.

Do all servers die when this happens, or is it just the one that is running?

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: COM Servers Unloading After Hit
  kirk allen
  Rick Strahl
  Jun 7, 2018 @ 11:54am

Thanks Rick.

I turned on logging as you suggested, and the log shows no errors; just loading the servers for each hit. And, to answer your question, yes it unloads all (2) servers after each hit.

Here's the log, showing 3 hits (I separated each hit with a blank line):

2018-06-07 11:32:00.681 - 204_dedc26ba - Starting Request - /signethome.snp?
2018-06-07 11:32:00.681 - 204_dedc26ba - Begin Loading COM Servers - /signethome.snp?
2018-06-07 11:32:01.305 - 204_dedc26ba - Loading COM Servers completed - /signethome.snp?
2018-06-07 11:32:01.305 - 204_dedc26ba - Retrieving Server Instance - /signethome.snp?
2018-06-07 11:32:01.305 - 204_dedc26ba - Server COM Instance retrieved: #2 - /signethome.snp?
2018-06-07 11:32:01.305 - 204_dedc26ba - Com Server ProcessHit Start - /signethome.snp?
2018-06-07 11:32:01.820 - 204_dedc26ba - Com Server ProcessHit Complete. Time: 518.00 - /signethome.snp?
2018-06-07 11:32:01.820 - 204_dedc26ba - Server COM Execution completed - /signethome.snp?
2018-06-07 11:32:01.835 - 204_dedc26ba - Request Complete - /signethome.snp?

2018-06-07 11:32:07.685 - 98_fcf4ba57 - Starting Request - /rmreps.npp?
2018-06-07 11:32:07.701 - 98_fcf4ba57 - Begin Loading COM Servers - /rmreps.npp?
2018-06-07 11:32:08.309 - 98_fcf4ba57 - Loading COM Servers completed - /rmreps.npp?
2018-06-07 11:32:08.309 - 98_fcf4ba57 - Retrieving Server Instance - /rmreps.npp?
2018-06-07 11:32:08.309 - 98_fcf4ba57 - Server COM Instance retrieved: #2 - /rmreps.npp?
2018-06-07 11:32:08.309 - 98_fcf4ba57 - Com Server ProcessHit Start - /rmreps.npp?
2018-06-07 11:32:08.809 - 98_fcf4ba57 - Com Server ProcessHit Complete. Time: 508.00 - /rmreps.npp?
2018-06-07 11:32:08.809 - 98_fcf4ba57 - Server COM Execution completed - /rmreps.npp?
2018-06-07 11:32:08.809 - 98_fcf4ba57 - Request Complete - /rmreps.npp?

2018-06-07 11:32:11.195 - 97_8777000b - Starting Request - /signethome.snp?
2018-06-07 11:32:11.211 - 97_8777000b - Begin Loading COM Servers - /signethome.snp?
2018-06-07 11:32:11.835 - 97_8777000b - Loading COM Servers completed - /signethome.snp?
2018-06-07 11:32:11.835 - 97_8777000b - Retrieving Server Instance - /signethome.snp?
2018-06-07 11:32:11.835 - 97_8777000b - Server COM Instance retrieved: #2 - /signethome.snp?
2018-06-07 11:32:11.835 - 97_8777000b - Com Server ProcessHit Start - /signethome.snp?
2018-06-07 11:32:12.350 - 97_8777000b - Com Server ProcessHit Complete. Time: 513.00 - /signethome.snp?
2018-06-07 11:32:12.350 - 97_8777000b - Server COM Execution completed - /signethome.snp?
2018-06-07 11:32:12.350 - 97_8777000b - Request Complete - /signethome.snp?

Also, I just changed back to the ISAPI handler (6.20) and it works as expected; they don't unload. I'm at a loss, but at least I have the ISAPI handler chugging along.

Thanks, Kirk

Gravatar is a globally recognized avatar based on your email address. re: COM Servers Unloading After Hit
  Rick Strahl
  kirk allen
  Jun 7, 2018 @ 12:23pm

If servers are unloading after each hit: Make sure your COM servers are compiled as Single Use EXE servers. Multi-use servers will crash after activation.

Other than that I don't know especially about the weird issue with querystring. You can also check the Windows Event log - if the Web Server is hard crashing then it should be listed there.

+++ Rick ---

© 1996-2024