Microsoft KB Archive/914790

From BetaArchive Wiki
Knowledge Base


Unscheduled process recycles occur when dynamic scripts are used in Microsoft Speech Server

Article ID: 914790

Article Last Modified on 3/16/2006



APPLIES TO

  • Microsoft Speech Server 2004 Enterprise Edition
  • Microsoft Speech Server 2004 Standard Edition
  • Microsoft Speech Server 2004 R2 Enterprise Edition
  • Microsoft Speech Server 2004 R2 Standard Edition





SYMPTOMS

In Microsoft Speech Server, the Telephony Application Service downloads a speech-enabled Web page. The Telephony Application Service then compiles the script blocks on the rendered page into a Microsoft ASP.NET assembly. If the script blocks on the page are not changed, the assembly is cached and will be reloaded for subsequent speech sessions. If dynamic scripts are used, the Telephony Application Service is forced to recompile the page into new assemblies. The rendered page is different because of the dynamic scripts. This problem causes unscheduled process recycles.

CAUSE

When the Telephony Application Service downloads a speech-enabled Web page, it compiles the script blocks into an ASP.NET assembly for security and scalability reasons. The Telephony Application Service compiles a different assembly for each page that is downloaded differently. Pages that contain dynamic scripts may be different every time and will cause the Telephony Application Service to compile different assemblies. However, because the ASP.NET page framework does not let you unload an assembly after it is loaded, the memory usage quickly increases until it reaches a memory threshold that triggers a process recycle.

RESOLUTION

To resolve this problem, remove the dynamic scripts in your application.

MORE INFORMATION

By default, the Telephony Application Service provides a scheduled application domain recycle every 10,000 calls and a scheduled process recycle at midnight every day. When the dynamic scripts are used in the speech application, many unscheduled process recycles occur on the Telephony Application Service in several hundred calls or in a short time, such as 30 minutes. Additionally, the Telephony Application Service may not be able to respond correctly when frequent unscheduled process recycles occur under high call volumes.

On the Microsoft Speech Server 2004 platform, events that are similar to the following occur.

Event Type:    Error
Event Source:  Telephony Application Services
Event Category: None
Event ID:      2083
Date:          1/1/2006
Time:          10:15:13 AM
User:          N/A
Computer:      MySpeechServer
Description:
TAS is performing an unscheduled worker process recycle because the available 
virtual bytes 401895424 dropped below the minimum limit 419430400. This could 
indicate that the RecycleCallLimit or LoadMemoryLimit properties are too high.  Use 
the Speech Server MMC snap-in to ensure that their values are correct.
The following information provides more details about this event:
 
Microsoft.SpeechServer.Log.ErrorMessageEvent
{
   Int32 ProcessID = 4080
   WindowsSecurityInfo WindowsSecurity = <null>
   ManagedSecurityInfo ManagedSecurity = <null>
   String StackTrace = ""
   String ServiceProvider = ""
   Int32 EventLogEntryTypeID = 1
   Int64 EventSequenceNumber = 24206
   String EventSourceInstance = "5e42f74f-dab3-4241-9929-60850ff986a3"
   String EventSourceName = "Application"
   String MachineName = "MYSpeechServer"
   DateTime TimeStamp = 1/1/2006 10:15:13 AM
   SpeechContext SpeechContext = <null>
}
 

On the Microsoft Speech Server 2004 R2 platform, events that are similar to the following may also occur.

Event Type:       Warning
Event Source:     Telephony Application Services
Event Category:   None
Event ID:         534
Date:             1/1/2006
Time:             6:11:44 AM
User:             N/A
Computer:         MYSpeechServer
Description:
The description for Event ID ( 534 ) in Source ( Telephony Application Services ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: The SALT interpreter detected dynamic script content for the following url: http://Mypage. To identify the dynamic content, review the versions of the script (tas2C.js tas2D.js tas2E.js tas2F.js) that were saved to: C:\DOCUME~1\NETWOR~1\LOCALS~1\Temp\axe_iv56. These files will be deleted during the next Application Domain recycle. 
Dynamic script may negatively impact performance. Refer to the MSS help files for tips on avoiding dynamic script content.
The following information provides more details about this event:

Microsoft.SpeechServer.Log.WarningMessageEvent
{
   Int32 ProcessID = 4056
   WindowsSecurityInfo WindowsSecurity = <null>
   ManagedSecurityInfo ManagedSecurity = <null>
   String StackTrace = ""
   String ServiceProvider = "InboundSaltApplication0_26"
   Int32 EventLogEntryTypeID = 2
   Int64 EventSequenceNumber = 183064
   String EventSourceInstance = "93b8112e-435a-4bbb-878c-c71a00c039e2"
   String EventSourceName = "Application"
   String MachineName = "MySpeechServer"
   DateTime TimeStamp = 1/1/2006 10:11:44 AM
   SpeechContext SpeechContext = {
      String ApplicationInstance = "7adfac2c-cd01-464a-aeea-e67ba89d997b"
      String PageUri = "http://Mypage
      String RequestID = <null>
   }
}

Additionally, you can use Performance Monitor to watch the following counters under "Telephony Application Services" when Microsoft Speech Server is taking calls:

  • Script Compilations
  • Scheduled Application Domain Recycles
  • Scheduled Process Recycles
  • Unscheduled Application Domain Recycles
  • Unscheduled Process Recycles

The Script Compilations counter increases indefinitely when dynamic scripts are used in the application. This behavior triggers unscheduled application domain recycles and process recycles.

Keywords: kbprb KB914790