Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have one .bat file which is responsible to take SQL Server database Backup and that is running by Windows Task Scheduler at 3.01 AM daily. Last 7 days it worked perfectly okay but today it failed. I got below information from Event Log.

It is Windows 2008 Server. It developed long back ago, now I am assigned to troubleshoot it. How can I fix it without restarting anything. Any comments or Idea is highly appreciated!

Log Name: Application Source: Microsoft-Windows-IIS-W3SVC-PerfCounters Date: 10/6/2016 3:01:18 AM Event ID: 2001 Task Category: None Level: Error Keywords: Classic User: N/A Computer: somename.example.com Description: It has taken too long to refresh the W3SVC counters, the stale counters are being used instead.

Log Name: Application Source: Microsoft-Windows-IIS-W3SVC-PerfCounters Date: 10/6/2016 3:01:50 AM Event ID: 2003 Task Category: None Level: Error Keywords: Classic User: N/A Computer: somename.example.com Description: It has taken too long to refresh the W3SVC counters, the stale counters are being used instead. This is the second message within the past 12:00:00 (hours, minutes, seconds). No more stale counter messages will be logged for this

client session until the time limit expires. For additional information specific to this message please visit the Microsoft Online Support site located at: http://go.microsoft.com/fwlink?linkid=538.

Kind Regards,
Shafik

What I have tried:

I checked

Evet ID: 2001 which is telling system error, I have nothing to do :o

Event ID : 2003 which is suggesting me to restart W3SVC which is not possible because that is in Production Server and I don't have downtime.
Posted
Updated 7-Oct-16 3:40am

1 solution

Your error isn't with your batch file it is with your server.

https://technet.microsoft.com/en-us/library/cc735059%28v=ws.10%29.aspx[^]

If you look at the documentation it even says

Quote:
The event log message is informational regarding performance counter status. The issue will be corrected by the system; you do not have to take any action.


That error message is usually due to your server maxing out on resources. So what appears to be happening is that your batch script is running at the same time your server is under load. When things slow down for your server, it is usually when it is able to resolve this issue.

As I see it you have the following options

1) Restart the service at a time where you can afford down time
2) Don't restart the service and re-think what your batch script is doing/when it is running and run it at a different time/in a different medium/language.
3) Increase available resources that your server has in order to prevent this error from happening. This could also include load balancing your server to accommodate extra load.

One thing to note though, restarting the w3svc process may not permanently fix your problem...it is probably only going to put off only to happen again later on down the road. The true fix here is to evaluate your hardware, see what is hogging up resources on your server and go from there.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900