logo

Configuring extended monitoring for tracking ELMA server restart

If you need to track the ELMA server restarts by means of the .NET platform, you can set up the web server configuration so that each server restart will be registered in the OS log with the restart date, time and reason. This setting may be useful both for gathering statistics of the web server work and for finding the reasons in case of unplanned restarts this refers to possible ASP.NET behavior models, during which the application restarts itself.

To configure automatic creation of entries on the application restarts in the OS log, edit the web.config file, by default located in: “C:\ELMA3-[Edition]\Web”.

Attention!
Saving the changes in the file will restart the server!

Add the following lines to the file:

<healthMonitoring>
 
   <rules>
 
    <add name="All Events" eventName="All Events" provider="EventLogProvider" profile="Default" minInstances="1" maxLimit="Infinite" minInterval="00:01:00" custom="" />
 
    <add name="App Lifetime Events" eventName="Application Lifetime Events" provider="EventLogProvider" profile="Default" minInstances="1" maxLimit="Infinite" minInterval="00:01:00" custom="" />
 
    <add name="App Audit Events" eventName="All Audits" provider="EventLogProvider" profile="Default" minInstances="1" maxLimit="Infinite" minInterval="00:01:00" custom="" />
 
   </rules>
 
  </healthMonitoring>

This section must be inside the tag <system.web>, which must contain the tags "". There may be several <system.web> tags and incorrect placement may negatively affect the system functioning. Example:

<system.web>
 
    <trust level="Full" originUrl=""/>
 
 <healthMonitoring>
 
   <rules>
 
    <add name="All Events" eventName="All Events" provider="EventLogProvider" profile="Default" minInstances="1" maxLimit="Infinite" minInterval="00:01:00" custom="" />
 
    <add name="App Lifetime Events" eventName="Application Lifetime Events" provider="EventLogProvider" profile="Default" minInstances="1" maxLimit="Infinite" minInterval="00:01:00" custom="" />
 
    <add name="App Audit Events" eventName="All Audits" provider="EventLogProvider" profile="Default" minInstances="1" maxLimit="Infinite" minInterval="00:01:00" custom="" />
 
   </rules>
 
  </healthMonitoring>
 
…
 
</system.web>

After you add the <healthMonitoring> tag, restart entries should appear in the Application log, which you can find in Control Panel - Administrative Tools - Event Viewer - Windows Logs - Application. Restart entry is categorized as a Web Event and looks like this:

Event code: 1002
Event message: Closing the application. Reason: Host environment stopped.
Event time: 02.04.2014 12:51:44
Event time (UTC): 02.04.2014 8:51:44

In this case, the reason is the behavior of the IIS server, since it is a hosting environment for the ELMA web server. Another example:

Event code: 1002
Event message: Closing the application. Reason: Maximum number of recompilations is reached.
Event time: 25.03.2014 16:49:37

According to the event description, the server was restarted upon reaching the maximum number of recompilations. When changing the files of the application, the ASP.NET platform starts its compilation to apply the changes made. Upon reaching a certain number of recompilations, the ASP.NET platform restarts the application, a special case of this situation is working with template files. When you create custom templates for documents, tasks, objects using the Razor markup, there is a chance of the system restart if numerous changes had been made over a short period of time, and each of the changes had been saved separately and checked in the web part, i.e. after each change the web page had been reloaded.