Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Simon Dingley 1474 posts 3431 karma points c-trib
    Oct 08, 2013 @ 14:54
    Simon Dingley
    0

    Logging Bottleneck in v4.x?

    I have a site which has a relatively complex (in terms of content selection) content slider/grid. Taking the slider out of the equation results in page load times of ~1 second which is great however with the slider enabled the page load takes a massive performance hit and before caching takes ~15 seconds which is unacceptable for the client (understandably)!

    I have a license for dotTrace profiler so I attempted to profile the application and was surprised to find that it was reporting the biggest hotspot was the Umbraco logging.

    *I should probably state at this point that I am new to performance profiling so you'll have to forgive and correct me if my findings are incorrect.

    enter image description here

    Is it possible to disable logging temporarily to eliminate this from my investigation? I don't think that the

    Thanks, Simon

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Oct 08, 2013 @ 15:24
    Morten Bock
    1

    Hi Simon.

    The logging should be asynchronous, so it should not affect your request threads performance.

    If you do want to disable it, just to be sure, I think you can do so in the log4net.config file. I can't remember the exact way of doing it, but maybe you can just comment out the rolling file appende target in there?

    /Bock

  • Simon Dingley 1474 posts 3431 karma points c-trib
    Oct 08, 2013 @ 15:46
    Simon Dingley
    0

    Thanks - you're right on both counts it is asynchronous and can be disabled by commenting out the following:

    <root>
        <!--
        <priority value="INFO"/>
        <appender-ref ref="AsynchronousLog4NetAppender" />
        -->
    </root>
    

    It has led me towards an error in the log file though after changing the priority level to ERROR I see the following error occurring each page load:

    2013-10-08 14:38:55,788 [17] ERROR Umbraco.Core.PluginManager - [Thread 15] Error creating type Eksponent.CropUp.Umbraco.UmbracoDefaults
    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Web.HttpException: Request is not available in this context
       at System.Web.HttpContext.get_Request()
       at System.Web.Handlers.AssemblyResourceLoader.GetWebResourceUrlInternal(Assembly assembly, String resourceName, Boolean htmlEncoded, Boolean forSubstitution, IScriptManager scriptManager, Boolean enableCdn)
       at System.Web.Handlers.AssemblyResourceLoader.GetWebResourceUrl(Type type, String resourceName, Boolean htmlEncoded, IScriptManager scriptManager, Boolean enableCdn)
       at System.Web.UI.ClientScriptManager.GetWebResourceUrl(Page owner, Type type, String resourceName, Boolean htmlEncoded, IScriptManager scriptManager, Boolean enableCdn)
       at System.Web.UI.ClientScriptManager.GetWebResourceUrl(Type type, String resourceName)
       at Eksponent.CropUp.Umbraco.UmbracoDefaults..ctor()
       --- End of inner exception stack trace ---
       at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
       at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
       at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
       at System.Activator.CreateInstance(Type type, Boolean nonPublic)
       at System.Activator.CreateInstance(Type type)
       at Umbraco.Core.PluginManager.CreateInstances[T](IEnumerable`1 types, Boolean throwException)
    

    At least that gives me another lead to follow!

    Thanks Morten :)

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Oct 08, 2013 @ 17:27
    Jeroen Breuer
    0

    In the umbracosettings.config you can also disable logging per type. For example:

    <disabledLogTypes>
      <logTypeAlias>debug</logTypeAlias>
      <logTypeAlias>notfound</logTypeAlias>
      <logTypeAlias>open</logTypeAlias>
      <logTypeAlias>packagerinstall</logTypeAlias>
      <logTypeAlias>packageruninstall</logTypeAlias>
      <logTypeAlias>ping</logTypeAlias>
      <logTypeAlias>custom</logTypeAlias>
    </disabledLogTypes>

    Jeroen

  • Simon Dingley 1474 posts 3431 karma points c-trib
    Oct 08, 2013 @ 17:34
    Simon Dingley
    0

    Hi Jeroen,

    I mentioned in my OP that the setting you mention may not be applicable as the following comment exists before it?

    Now that we have Log4Net logging enabled, this section is only used for what gets logged to the umbracoLog table which currently logs items used in the audit trail and roll back scenarios.

    I don't think you need to explicitly disable all of the log types like that now?

    Thanks, Simon

Please Sign in or register to post replies

Write your reply to:

Draft