« Previous Next »

Thread: Error opening Output file when Multiplexing

Last post 11-08-2006 12:43 PM by LogParser User : Forester. 5 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (6 items)

Sort Posts:

  • 11-03-2006, 5:44 PM

    Error opening Output file when Multiplexing

    Hi.
    I'm trying to multiplex multiple IIS log files from a single web domain into separate directories based on the web
    directory "root" located within the cs-uri-stem of each IIS log file entry.

    So far I've been able to create the separate directories for each directory "root" with no problem using a query where
    I'm only reading from a single log file like the following:


    "SELECT DISTINCT EXTRACT_TOKEN(cs-uri-stem, 1, '/') AS DirectoryName, *
    INTO E:\SummaryData\*\year_to_date.log
    FROM E:\w3logs\corp.weyer.com\WAWTCAIIS21\ex061018.log
    WHERE DirectoryName NOT IN ('_vti_bin' ;'')" -i:IISW3C -o:w3c

    Statistics:
    -----------
    Elements processed: 3386
    Elements output:    3383
    Execution time:     0.14 seconds

    No problem.

    ==========
    But (There's always a but, isn't there?) when I try to multiplex out from multiple log files by putting a wildcard in the FROM clause in the same job as in the following:


    "SELECT DISTINCT EXTRACT_TOKEN(cs-uri-stem, 1, '/') AS DirectoryName, *
    INTO E:\SummaryData\*\year_to_date.log
    FROM E:\w3logs\corp.weyer.com\WAWTCAIIS21\ex06*.log
    WHERE DirectoryName NOT IN ('_vti_bin' ;'')" -i:IISW3C -o:w3c

    logparser returns the error:

    Task aborted.
    Error while opening file "E:\SummaryData\weycodir\year_to_date.log": The
      process cannot access the file because it is being used by another process.

    I've checked the obvious to be sure that the file is not actually in use by another application and it doesn't
    appear to be.

    I've played around with the filemode output parameter to no avail and am probably doing something blatantly stupid.

    Any help very much appreciated!

    New Guy

    ====
    Also added an attachment that will hopefully help illustrate what I'm trying to do.

  • 11-04-2006, 9:56 AM In reply to

    RE: Error opening Output file when Multiplexing

    Hrm. that certainly looks odd. I'd suggest trying out Sysinternal's FileMon utility filtering for *year_to_date.log* to see where and when LP is trying to write to the file. Given the error returned by LP, you should see a file system write lock error somewhere in there.

    The only thing I can think of that might be happening is maybe there are two slightly different spellings or capitalizations of weycodir or two different character encodings or something and LP is trying to open a new file but the Windows file system, being case insensitive is actually trying to open the same one twice.

    You could validate that hypothesis by just running a query showing the distinct DirectoryName fields. e.g.:

    SELECT DISTINCT EXTRACT_TOKEN(cs-uri-stem, 1, '/') AS DirectoryName
    INTO DATAGRID
    FROM E:\w3logs\corp.weyer.com\WAWTCAIIS21\ex06*.log
    WHERE DirectoryName NOT IN ('_vti_bin' ;'')
  • 11-07-2006, 4:35 PM In reply to

    RE: Error opening Output file when Multiplexing

    You were right on the money!

    Found both "WeyCoDir" and "weycodir" in my search.

    So if I've interpreted this correctly, I'm telling LogParser to wildcard to two separate (case sensitive) directories, which it is trying to do, while the operating system is resolving them to a single (case insensitive) directory.

    So I'm assuming that there is a thread/pipe per destination from logparser's perspective, hence the lock?  ( and the speed of processing!).

    So if I normalize the "DirectoryName" into truly distinct (case insensitive) tokens, then I should only end up with 1 distinct directory despite the case variation, only one thread per destination, no lock, no foul, end of problem?

    I'll give it a whirl.  

    Thanks for the tip toward FileMon as well.

    I'd seen the SysInternals utilities before but had never loaded one up as of yet.

    That one in particular is extremely useful and will go into my bag of tricks.

    Thanks for the excellent help.

  • 11-08-2006, 6:19 AM In reply to

    RE: Error opening Output file when Multiplexing

    Yay!
    Good.
    Yep.
    Probably.
    Yep.
    Good luck!

    Sysinternals tools rock as much as LP does.
  • 11-08-2006, 11:11 AM In reply to

    RE: Error opening Output file when Multiplexing

    The following query cleared this up Daniel:

    D:\logparser>logparser

    "SELECT DISTINCT TO_LOWERCASE(EXTRACT_TOKEN(cs-uri-stem, 1, '/')) AS DirectoryName, * INTO E:\SummaryData\*\year_to_date.log

    FROM E:\w3logs\corp.weyer.com\WAWTCAIIS21\ex0610*.log

    WHERE DirectoryName NOT IN ('_vti_bin' ;'')" -i:IISW3C -o:w3c

    Statistics:
    -----------
    Elements processed: 186891
    Elements output:    185974
    Execution time:     11.47 seconds

    Thanks again for the help!

  • 11-08-2006, 12:43 PM In reply to

    RE: Error opening Output file when Multiplexing

    Well, I guess I spoke too soon.

    I should probably start a new topic on this but being new around here, I'm a little un-sure of the "protocol" at this point.

    So after our last episode, I expanded my multiplex job with a wildcard on the FROM clause to process all log files for the month of January of this year, as follows: 

    D:\logparser>logparser

    "SELECT DISTINCT TO_LOWERCASE(EXTRACT_TOKEN(cs-uri-stem, 1, '/')) AS DirectoryName, *

    INTO E:\SummaryData\*\year_to_date.log

    FROM E:\w3logs\corp.weyer.com\WAWTCAIIS21\ex0601*.log WHERE DirectoryName NOT IN ('_vti_bin' ;'')" -i:IISW3C -o:w3c

    LogParser executed but showed no processing results.

    I checked the applicaiton event log and found the exception shown in the attachment.

    I'm assuming that I'm being too greedy in terms of trying to process too much data with the utility and ran out of memory or caused a stack overflow or something.

    Sorry to be a pain. Any help appreciated.

    Thanks.  

Page 1 of 1 (6 items)
Microsoft Communities