{"id":2273,"date":"2016-11-16T23:22:54","date_gmt":"2016-11-16T23:22:54","guid":{"rendered":"http:\/\/pariswells.com\/blog\/?p=2273"},"modified":"2023-06-08T09:01:20","modified_gmt":"2023-06-08T09:01:20","slug":"iis-performance-counter-total-locked-errors-how-to-detect-locked-files","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/random\/iis-performance-counter-total-locked-errors-how-to-detect-locked-files","title":{"rendered":"IIS Performance Counter &#8211; Total Locked Errors &#8211; How to detect locked files"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\"alignleft\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"77\" src=\"http:\/\/pariswells.com\/blog\/wp-content\/uploads\/2015\/12\/solarwinds-inc-logo1-300x77.jpg\" alt=\"solarwinds-inc-logo[1]\" class=\"wp-image-1825 img-responsive\" srcset=\"https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2015\/12\/solarwinds-inc-logo1-300x77.jpg 300w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2015\/12\/solarwinds-inc-logo1-768x197.jpg 768w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2015\/12\/solarwinds-inc-logo1-1024x263.jpg 1024w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2015\/12\/solarwinds-inc-logo1.jpg 1149w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/figure>\n<\/div>\n\n\n<p>We had some alerts coming up for an IIS site in Solarwinds which read the value for this&nbsp;<\/p>\n\n\n\n<p><br><strong>Win32_PerfFormattedData_W3SVC_WebService(SITECODE)\\TotalLockedErrors<\/strong><\/p>\n\n\n\n<p>And alerted us when above 0. This is a Custom Performance Counter Monitor which uses WMI to get the counter by reading the IIS Log Files.<\/p>\n\n\n\n<p>Per Microsoft Description of the alert :&nbsp;<\/p>\n\n\n\n<p><em>Number of requests that could not be satisfied by the server because the requested document was locked (since service startup).Generally reported as HTTP error 423.<\/em><\/p>\n\n\n\n<p>There is no other way to find out which files were locked apart from Parsing the IIS Log Files<\/p>\n\n\n\n<p><strong>How to do this?<\/strong><\/p>\n\n\n\n<p>Download and install these both<\/p>\n\n\n\n<p><a href=\"https:\/\/www.microsoft.com\/en-us\/download\/confirmation.aspx?id=24659\">https:\/\/www.microsoft.com\/en-us\/download\/confirmation.aspx?id=24659<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/techcommunity.microsoft.com\/t5\/exchange-team-blog\/introducing-log-parser-studio\/ba-p\/601131\">https:\/\/techcommunity.microsoft.com\/t5\/exchange-team-blog\/introducing-log-parser-studio\/ba-p\/601131<\/a> -> Click on LPSV2.D2.zip<\/p>\n\n\n\n<p><a href=\"https:\/\/techcommunity.microsoft.com\/gxcuf89792\/attachments\/gxcuf89792\/Exchange\/16744\/1\/LPSV2.D2.zip\"><\/a><\/p>\n\n\n\n<p>Once done , open up Studio and&nbsp;insert the&nbsp;IIS Log Files. (&nbsp;<a href=\"https:\/\/www.iis.net\/configreference\/system.applicationhost\/sites\/sitedefaults\/logfile\">Click here for how to find these<\/a>&nbsp;)&nbsp;<\/p>\n\n\n\n<p>Make sure the&nbsp;Log type is set to&nbsp;IISW3CLOG&nbsp;<\/p>\n\n\n\n<p>Use the Query below to Query all the 423 Errors<\/p>\n\n\n\n<p>The list you are presented should show you all the files that have been locked which you can inspect and up the threshold if needed or increase the value of this Threshold!<\/p>\n\n\n<p>\/* All 423 errors to any IIS\/.NET Web Service *\/<\/p>\n<p>SELECT cs-uri-stem as Uri,<\/p>\n<p>sc-status as HttpStatus,<\/p>\n<p>sc-substatus as SubStatus,<\/p>\n<p>sc-win32-status as Win32Status,<\/p>\n<p>       COUNT(*) AS Total<\/p>\n<p>FROM &#8216;[LOGFILEPATH]&#8217;<\/p>\n<p>WHERE (sc-status = 423)<\/p>\n<p>GROUP BY Uri, HttpStatus, SubStatus, Win32Status<\/p>\n<p>ORDER BY Total DESC<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We had some alerts coming up for an IIS site in Solarwinds which read the value for this&nbsp; Win32_PerfFormattedData_W3SVC_WebService(SITECODE)\\TotalLockedErrors And alerted us when above 0. This is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[1659,1660,1401,1658,1663,1662,1661,1267,1664],"class_list":["post-2273","post","type-post","status-publish","format-standard","hentry","category-random","tag-how-to-find-locked-files","tag-http-error-423","tag-iis","tag-locked","tag-locked-files","tag-log-files","tag-parse","tag-solarwinds","tag-total-locked-files"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/2273","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=2273"}],"version-history":[{"count":4,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/2273\/revisions"}],"predecessor-version":[{"id":6969,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/2273\/revisions\/6969"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=2273"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=2273"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=2273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}