« Previous Next »

Thread: Logging vs. kernel mode caching

Last post 11-07-2009 3:13 AM by anilr. 8 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (9 items)

Sort Posts:

  • 05-14-2009, 4:57 AM

    Logging vs. kernel mode caching

    I keep reading about the kernel mode caching getting disabled when doing ODBC logging and probably also by using an HttpModule.

    Will the advanced logging module disable kernel mode caching or will it simply not log items getting server from the cache?

    We aim to get all our logs to a database, either directlym or by using file based logs and importing them later. (unfortunately the space-seperated log-files are annoying to import to a database)

    Any thoughts on the issue and what approach is the best having caching in mind aswell.

    On a sidenote our current ODBC logging is missing value for processingtime. Posted another thread about that issue here http://forums.iis.net/t/1157537.aspx

  • 07-16-2009, 8:14 PM In reply to

    • bobbyv
    • Top 100 Contributor
    • Joined on 06-12-2002, 4:12 AM
    • Redmond, WA
    • Posts 57

    Re: Logging vs. kernel mode caching

    Hi lester,

    sorry for the slow response, but i'll try to address your questions.

    wrt kernel cache, advancedLogging will not disable it.  It is a seperate feature so the user must decide whether or not they want it enabled.  Having said that, when kernel cache is enabled, the request gets served immediately from cache and does not enter the pipeline.  the result is that iis never sees it and thus, it will not be logged.

    wrt importing your logs into a database, this is something that you can do with advanced logging.  Here is an overview of what to expect:  http://blogs.iis.net/vsood/archive/2009/03/20/advanced-logging-how-does-real-time-logging-work.aspx

     And here is a walkthrough of how it actually works:  http://learn.iis.net/page.aspx/581/advanced-logging-for-iis-70---real-time-logging  There's sample code in the walkthrough to help you get started.

     hope this helps...

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • 08-10-2009, 2:31 AM In reply to

    Re: Logging vs. kernel mode caching

     Aha, now thats a key difference then, not being enabled vs. not being logged.

     Thank you for clearing that up.

    On another note: it seems that advanced/custom logging must be installed in order to actually enable ODBC logging - a dependency not taken in consideration when choosing to add the ODBC logging feature.

    Note to self: When using ODBC source, a 64 bit application pool uses the standard ODBC source, for it to work with a 32 bit app pool. odbc32.exe must be run from the syswow64 folder and appropriate ODBC source created.

  • 08-18-2009, 2:23 PM In reply to

    • bobbyv
    • Top 100 Contributor
    • Joined on 06-12-2002, 4:12 AM
    • Redmond, WA
    • Posts 57

    Re: Logging vs. kernel mode caching

    Could you elaborate a bit on what you mean by this comment:

    "On another note: it seems that advanced/custom logging must be installed in order to actually enable ODBC logging - a dependency not taken in consideration when choosing to add the ODBC logging feature."

    ODBC logging is a built-in IIS Logging feature which has been around for several versions of IIS.  "Advanced Logging", on the other hand, is a new module that plugs into the IIS7 pipeline to enable more robust logging capabilities which were not possible in the built-in IIS Logging feature.  They were designed and developed independently and, thus, can be used independently.

    If you're trying to get ODBC logging to work in IIS7, please refer to this forum thread:  http://forums.iis.net/t/1154908.aspx 

    If you're trying to get AdvancedLogging to log directly to a database via real-time logging, please provide specifics and I could try to help you out with that.

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • 08-19-2009, 1:37 AM In reply to

    Re: Logging vs. kernel mode caching

     Sure I can, try atleast.

     Been a while, so cannot remember if this was the actual site that helped me getting it to work, but this was exactly our error. http://mattlog.net/2009/04/16/iis-odbc-logging-event-id-1016-error-data-80070057/   ODBC logging failing and warnings added in eventviewer. Did what Matt he is also showing as the solution, enabled the custom logging feature and ODBC logging started working.

    If I recall it right, the ODBC logging had to be enabled via some appCmd and there is no kind of warning, adding the ODBC logging feature does not automatically add the custom logging feature or state that it is depending on that to work.

     Though this may or may not be correct, it did indeed solve the problem for us. Of course it could be something else than the custom logging feature itself that did the trick, but whatever it was, it got active when that specific feature was added.

  • 08-19-2009, 2:36 PM In reply to

    • bobbyv
    • Top 100 Contributor
    • Joined on 06-12-2002, 4:12 AM
    • Redmond, WA
    • Posts 57

    Re: Logging vs. kernel mode caching

    I think I see where the confusion lies.  There's a "Custom" logging feature in the built-in iis logging which is basically how ODBC logging works.  "Advanced Logging" uses the term "custom logging" to signify that you can define which ever fields you're interested in (ie serverVariables, requestHeaders, responseHeaders, perfCounters) and that you are not restricted to the pre-defined fields defined by IIS.

    In your case, you are not using "Advanced Logging".  You're using the built-in IIS Logging feature but using the "Custom" log format (as opposed to W3C, IIS or NCSA).

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • 10-20-2009, 6:04 PM In reply to

    • thaichi23
    • Not Ranked
    • Joined on 10-20-2009, 10:44 AM
    • Posts 4

    Re: Logging vs. kernel mode caching

     Sorry to barge in on the conversation but I went through about the same steps and enabled the custom logging in iis7 as well.  The information shows up in my sql server but it is not showing bytes sent/recieved, it just shows zeroes.

     I am having difficulty setting the logextfileflags without getting errors and would like to know if installing Advanced Logging help me to add that field to the database?

  • 11-02-2009, 1:44 PM In reply to

    • bobbyv
    • Top 100 Contributor
    • Joined on 06-12-2002, 4:12 AM
    • Redmond, WA
    • Posts 57

    Re: Logging vs. kernel mode caching

    Sorry for the delayed response. 

    Advanced Logging will not help you with the problems you are experiencing since you are using the 'custom logging' option of the built-in IIS Logging feature.  Advanced Logging and the built-in IIS Logging are separate features and function independently of each other.

    To resolve your problems though, are all requests being logged as zeroes?  How are you logging it to your sql server?

     

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • 11-07-2009, 3:13 AM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 6:13 PM
    • Redmond, WA
    • Posts 2,343

    Re: Logging vs. kernel mode caching

    I believe you are using ODBC logging built into IIS - this is a known bug in the ODBC logging implementation in IIS7+

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
Page 1 of 1 (9 items)
Microsoft Communities