Web Connection
COM start up problems
Gravatar is a globally recognized avatar based on your email address. COM start up problems
  Kuzma Karbachinskiy
  All
  May 9, 2019 @ 10:09am

Hi Rick,

Company uses web connection 6.20. Application runs very well in FILE mode like 5 background instances started by admin web site. COM mode is not stated sometimes. It can be started by admin web site or by application request. In case of application request start all not background application set off to make the most favorable conditions for COM to start. There were collected errors records in wcTraceLog.txt to get Errors of application site and wcErrors.txt to get errors of NET manged hadler. I have question about frase 'failed to start in time'. What time is required for instance to start in NET manged handler? Do I have possibilities to manage this time? I can see in 'Task Manager' that all 5 instances are started, but application blocked from starting by message like 'Server Emmis2012.Emmis2012Server[4] failed to start in time.'. I provide text that was collected of wctraceLog.txt and wcErrors.txt.

COM 5 Instances application site not started
wcTraceLog
05/09/2019 11:38:26 AM - OnInit Started
05/09/2019 11:38:26 AM - OnInit read Emmis2012.ini complited
05/09/2019 11:38:26 AM - OnInit oConfig complited
05/09/2019 11:38:26 AM - OnInit complited
05/09/2019 11:38:26 AM - OnInitCompleted Started No errors
05/09/2019 11:38:26 AM - OnInitComplited finished No errors
05/09/2019 11:38:30 AM - OnInit Started
05/09/2019 11:38:30 AM - OnInit read Emmis2012.ini complited
05/09/2019 11:38:30 AM - OnInit oConfig complited
05/09/2019 11:38:30 AM - OnInit complited
05/09/2019 11:38:30 AM - OnInitCompleted Started No errors
05/09/2019 11:38:30 AM - OnInitComplited finished No errors
05/09/2019 11:38:35 AM - OnInit Started
05/09/2019 11:38:35 AM - OnInit read Emmis2012.ini complited
05/09/2019 11:38:35 AM - OnInit oConfig complited
05/09/2019 11:38:35 AM - OnInit complited
05/09/2019 11:38:35 AM - OnInitCompleted Started No errors
05/09/2019 11:38:35 AM - OnInitComplited finished No errors
05/09/2019 11:38:38 AM - OnInit Started
05/09/2019 11:38:38 AM - OnInit read Emmis2012.ini complited
05/09/2019 11:38:38 AM - OnInit oConfig complited
05/09/2019 11:38:38 AM - OnInit complited
05/09/2019 11:38:38 AM - OnInitCompleted Started No errors
05/09/2019 11:38:38 AM - OnInitComplited finished No errors
05/09/2019 11:38:42 AM - OnInit Started
05/09/2019 11:38:42 AM - OnInit read Emmis2012.ini complited
05/09/2019 11:38:42 AM - OnInit oConfig complited
05/09/2019 11:38:42 AM - OnInit complited
05/09/2019 11:38:42 AM - OnInitCompleted Started No errors
05/09/2019 11:38:42 AM - OnInitComplited finished No errors

wcErrors
2019-05-09 11:38:33.887 - 263_3c6f4b0c - Unhandled Exception (Mainline): Server Emmis2012.Emmis2012Server[4] failed to start in time.
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.ComProcessor.LoadServers(Boolean initializeOnly)
   at Westwind.WebConnection.ComProcessor.ProcessRequest()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /Emmis2012/wc.wc?Emmis2012%7eMenus%7eTopLevelMenu%7eIndex.htm
_______________________________________________________________________________________________________________
COM 5 Instances application site not started
wcTraceLog
05/09/2019 11:50:00 AM - OnInit Started
05/09/2019 11:50:00 AM - OnInit read Emmis2012.ini complited
05/09/2019 11:50:00 AM - OnInit oConfig complited
05/09/2019 11:50:00 AM - OnInit complited
05/09/2019 11:50:00 AM - OnInitCompleted Started No errors
05/09/2019 11:50:00 AM - OnInitComplited finished No errors
05/09/2019 11:50:03 AM - OnInit Started
05/09/2019 11:50:03 AM - OnInit read Emmis2012.ini complited
05/09/2019 11:50:03 AM - OnInit oConfig complited
05/09/2019 11:50:03 AM - OnInit complited
05/09/2019 11:50:03 AM - OnInitCompleted Started No errors
05/09/2019 11:50:03 AM - OnInitComplited finished No errors
05/09/2019 11:50:07 AM - OnInit Started
05/09/2019 11:50:07 AM - OnInit read Emmis2012.ini complited
05/09/2019 11:50:07 AM - OnInit oConfig complited
05/09/2019 11:50:07 AM - OnInit complited
05/09/2019 11:50:07 AM - OnInitCompleted Started No errors
05/09/2019 11:50:07 AM - OnInitComplited finished No errors
05/09/2019 11:50:10 AM - OnInit Started
05/09/2019 11:50:10 AM - OnInit read Emmis2012.ini complited
05/09/2019 11:50:10 AM - OnInit oConfig complited
05/09/2019 11:50:10 AM - OnInit complited
05/09/2019 11:50:10 AM - OnInitCompleted Started No errors
05/09/2019 11:50:10 AM - OnInitComplited finished No errors
05/09/2019 11:50:13 AM - OnInit Started
05/09/2019 11:50:13 AM - OnInit read Emmis2012.ini complited
05/09/2019 11:50:13 AM - OnInit oConfig complited
05/09/2019 11:50:13 AM - OnInit complited
05/09/2019 11:50:13 AM - OnInitCompleted Started No errors
05/09/2019 11:50:13 AM - OnInitComplited finished No errors

wcErrors
2019-05-09 11:49:29.938 - 254_c3ad909f - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /Emmis2012/admin/ShowServerList.wc?1557416969750
2019-05-09 11:49:34.956 - 254_c3ad909f - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /Emmis2012/admin/ShowServerList.wc?1557416969750
2019-05-09 11:49:39.975 - 254_c3ad909f - Server Loading failed: Invalid Com Server ProgId: 
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /Emmis2012/admin/ShowServerList.wc?1557416969750
2019-05-09 11:50:06.028 - 240_a9f396ac - Unhandled Exception (Mainline): Server emmis2012.Emmis2012Server[2] failed to start in time.
   at Westwind.WebConnection.ComServerManager.LoadServers()
   at Westwind.WebConnection.ComProcessor.LoadServers(Boolean initializeOnly)
   at Westwind.WebConnection.ComProcessor.ProcessRequest()
   at Westwind.WebConnection.WebConnectionHandler.ProcessRequest(HttpContext context) - /emmis2012/wc.wc?Emmis2012%7eMenus%7eTopLevelMenu%7eIndex.htm
___________________________________________________________________________________________________________________________

I read your post https://west-wind.com/wconnect/weblog/ShowEntry.blog?id=938. Could you tell about system problems? COM starts well with 2 instances in my case. Executable has size 15.260 MB. Application resides on virtual machine widows server 2012 R2. Sometime I have errors like 'Server Loading failed: Invalid Com Server ProgId', but application started as COM 5 instances. How to make stable COM 5 instances start up?

Thank you, Kuzma Karbachinskiy kkarbachinskiy@oneworldonestop.com

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Rick Strahl
  Kuzma Karbachinskiy
  May 10, 2019 @ 01:04am

The first failure is a server timeout which means most likely the server failed to load or hung in OnInit() if you have any code in OnInit() that doesn't anything like accessing data etc. I recommend you move it to OnLoad() as that's loaded after the server has been initialized.

The second errors are invalid COM Ids. Either it's a bad ID or the server doesn't have permissions to read those COM servers from the registry. You might need DComConfig if you're using custom permissions for the IIS Application Pool.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Kuzma Karbachinskiy
  Rick Strahl
  May 10, 2019 @ 06:19am

Hi Rick,

I am following up your recommendations. I have web connection 6.20. I looked in file 'wwserver.prg' and found that PROTECTED FUNCTION OnInit inserted in PROTECTED FUNCTION OnLoad. I hope they should be separated. Implementation of wwserver's OnInit() in my main I have code to point to my.ini file. I can't move it to OnLoad, because wwserver:OnInit has code pointed to "wcMain.ini" and OnInit fires at very begining of server's Init(). I'll move everything else from OnInit to keep it to MINIMUM. Could you tell please: "When is THIS.cCOMReleaseUrl used"? COM is invisible and doesn't have form's exit button.
Thank you for your replay.

Kuzma Karbachinskiy kkarbachinskiy@oneworldonestop.com

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Rick Strahl
  Kuzma Karbachinskiy
  May 10, 2019 @ 02:11pm

Implementation of wwserver's OnInit() in my main I have code to point to my.ini file.

That's normal and that should be in there because that has to be done before Web Connection starts configuring itself. That's generated into the default template. But anything else (unless it's somehow needed during configuration) should not be in OnInit() but OnLoad() instead. With 6.15 and later OnLoad() fires after the servers INIT constructor, and on the first actual incoming hit. By doing this at minimum you allow the server to laod and not crash during the startup phase which is very difficult to debug. Request debugging when the server instance is fully alive is somewhat easier (although not easy either - see doc topic).

.cComReleaseServer

This property is used only by the button on the form to release the server - it comes from the configuration setting in the yourApp.ini file.

In COM mode you have to release the server via a URL in the browser - you can do that from the Module Admin page or by directly putting in that URL - add a shortcut in your browser so you can get to it quickly when developing/testing.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: COM start up problems
  Kuzma Karbachinskiy
  Rick Strahl
  May 13, 2019 @ 06:28am

Hi Rick,

Thank you for your replay and detailed explanation.

Kuzma Karbachinskiy, kkarbachinskiy@oneworldonestop.com

© 1996-2019