Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where would be the proper optimization
Message
De
28/01/2015 22:07:58
 
 
À
28/01/2015 16:50:57
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01614429
Message ID:
01614563
Vues:
22
Here is what I added in the Application_Start() to take care of it. I cannot see a reload of the worker process instances on UAT after many tests I have did. I am not able to deploy that on a production environment soon however. However, I will see if I can have that support inside the global.asax instead as a temporary measure.
    Sub Application_Start()
        Dim loFieldInfo As FieldInfo = Nothing
        Dim loMethodInfo As MethodInfo = Nothing
        Dim loObject As Object = Nothing
        Dim loObject2 As Object = Nothing
        Dim loPropertyInfo As PropertyInfo = Nothing

        RegisterSoapExtension(GetType(TraceExtension), 1, 0)

        ' Microsoft IIS/ASP.NET has a bug that after a very long period of time, it can start restarting the worker process
        ' several times per minute, for days, causing an enormous amount of load
        ' As there is no guarantee this will come back, we disable this FCN at this level
        ' This code will turn off monitoring from the root website directory, but monitoring of Bin, App_Themes and other folders will
        ' still be operational, so updated DLLs will still auto deploy
        loPropertyInfo = GetType(System.Web.HttpRuntime).GetProperty("FileChangesMonitor", _
         BindingFlags.NonPublic Or BindingFlags.Public Or BindingFlags.Static)
        loObject = loPropertyInfo.GetValue(Nothing, Nothing)

        ' Turn off FCN on the sub directories
        loFieldInfo = loObject.GetType().GetField("_dirMonSubdirs", BindingFlags.Instance Or BindingFlags.NonPublic Or BindingFlags.IgnoreCase)
        loObject2 = loFieldInfo.GetValue(loObject)

        ' Send the deactivation notice
        loMethodInfo = loObject2.GetType().GetMethod("StopMonitoring", BindingFlags.Instance Or BindingFlags.NonPublic)
        loMethodInfo.Invoke(loObject2, New Object() {})

    End Sub
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform