Web Connection
Multiple IIS sites setup using File mode and same .exe - random freeze / hang issue (Web Connection 5.53)
Gravatar is a globally recognized avatar based on your email address. Multiple IIS sites setup using File mode and same .exe - random freeze / hang issue (Web Connection 5.53)
  Alex
  All
  Sep 10, 2020 @ 03:40pm

Good day Rick,

Our legacy VFP app written with Web Connection 5.53

Recently we stated migration project and for that we installing multiple copies of our websites on the same IIS server for migration testing purposes. Those sites about 90% same with some minor variations / customizations.

When we setup new instance in IIS we basically copy same .exe over and over again to different \inetpub\ subfolders and change name to be unique like app1, app2 and so on to distinguish between different sites. See web.config below attached

This configuration seems to work even so all running .exe are identical / have same COM server signature and the only difference is in path & name.

Problem is that in about every ~5mins or so (it's somewhat random) our apps will hang / freeze. It look's like request (any) getting stuck. After ~60..90 secs that request finally getting processed like nothing happen. This is very consistent and causes major PITA for our QA team and the worst thing we can not figure out what is going on. We initially tried to use COM mode but it takes way too much effort to setup and also requires rebuilding of original project (to get new / unique GUID) so we went with below File setup which we fully automated so we can spin as many test websites as needed. Looked at temp\wcerrors.txt - could not find anything suspicions there

Thank you in advance!

PS Server is EC2 AWS instance

Alex

**web.config**
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <configSections>
    <section name="webConnectionConfiguration" type="System.Configuration.NameValueSectionHandler,System,Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
    <section name="webConnectionErrorPages" type="System.Configuration.NameValueSectionHandler,System,Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
  </configSections>
  <webConnectionConfiguration>
    <!-- NOTE: These settings apply only to the Web Connection Managed Module! -->
    <add key="Timeout" value="60" />
    <add key="PostBufferLimit" value="0" />
    <add key="TempPath" value="C:\inetpub\app1\temp\" />
    <add key="TempFilePrefix" value="WC_" />
    <add key="MessagingMechanism" value="File" />
    <add key="AdminAccount" value="" />
    <add key="AdminPage" value="/admin/admin.aspx" />
    <add key="ExeFile" value="C:\inetpub\app1\app1.exe" />
    <add key="UpdateFile" value="" />
    <add key="LogDetail" value="True" />
    <add key="ValidateRequest" value="False" />
    <add key="ComServerProgId" value="eApp.eAppServer" />
    <add key="ComServerLoadingMode" value="LoadBased" />
    <add key="ServerCount" value="2" />
    <add key="AutoStartServers" value="True" />
    <add key="MessageDisplayFooter" value="<small>Message generated by Web Connection IIS Connector Module</small>" />
  </webConnectionConfiguration>
  <system.web>
    <compilation defaultLanguage="c#" debug="true">
    </compilation>
    <trust level="Full" />
    <identity impersonate="false" />
  </system.web>
  <!-- IIS 7 Script Map Configuration -->
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <handlers accessPolicy="Read, Script">
      <add name="*.wc_wconnect" path="*.wc" verb="*" type="Westwind.WebConnection.WebConnectionHandler,WebConnectionModule" resourceType="Unspecified" />
    </handlers>
  </system.webServer>
  <webConnectionErrorPages>
    <add key="Exception" value="" />
    <add key="OleError" value="" />
    <add key="Timeout" value="" />
    <add key="NoOutput" value="" />
    <add key="Busy" value="" />
    <add key="Maintenance" value="" />
    <add key="InvalidRequestId" value="" />
    <add key="TranmitFileFailure" value="" />
    <add key="PostBufferSize" value="" />
  </webConnectionErrorPages>
</configuration>
Gravatar is a globally recognized avatar based on your email address. re: Multiple IIS sites setup using File mode and same .exe - random freeze / hang issue (Web Connection 5.53)
  Rick Strahl
  Alex
  Sep 11, 2020 @ 07:40pm

Hi Alex,

I suspect the issue is that your application is hanging. Is this happening when the app is not running on the desktop (ie. under SYSTEM or some other user account rather than INTERACTIVE on the main desktop)? File open dialog box perhaps or any other UI operation that effectively hangs the application? In file mode there's unfortunately no way around that issue. In COM mode one can use SYS(2335,0) (COM Unattended mode) to force errors for UI operations rather than hanging, but in File mode those types of errors open a dialog invisibly and hang.

You can probably test this by running your application(s) interactively on the desktop and check and see what happens when they hang...

This is one of the (many) reasons to run in COM mode as well as the fact that COM Mode will automatically restart servers that are timed out or crash which file mode cannot do.

If you are recompiling your application for each site (ie. unique EXE for each site) then COM can be a pain in the ass for the reasons you mention - you need a unique AppId for each server and getting that right can be an administrative pain. But if you are already building custom EXEs for each app this may not be a lot of extra hassle.

If all the apps can use the same EXE you can change your startup code to change the start folder on load and in that case you may be able to get away with running with a single EXE for all applications and use parameterized settings instead.

+++ Rick ---

© 1996-2024