Question

Running a Windows 2003 with SQL Server 2005 on, with around ~85-90 jobs which run once per hour (at different times), generating new sitemaps for each website hosted on the server, along with un-publishing pages.

The issue which I'm having with the server is that, the server seems to be running in three stages, the jobs run between 8am - 6pm each day, and the server is restarted around 2-3am every morning.

Once the jobs start in the morning, they will run successfully for around 90 minutes (9.30am), taking around 3-5 seconds to complete the job.

After 9.30, the jobs will start correctly, then, get stuck on executing (using 100% CPU).

If I manually stop the job, the server goes back to normal, but then the jobs will fail to execute at all, throwing the error below. (They were changed to run every 60 minutes, not every 15 a few months ago, but the names were never changed)

Step ID     1
Server      [Server Name]
Job Name        Execute Replicate File For [website] web
Step Name       Vbscript for Replicate File  every 15Minutes
Duration        00:00:00
Sql Severity        0
Sql Message ID      0
Operator Emailed        
Operator Net sent       
Operator Paged      
Retries Attempted       0

Message
Executed as user: [Domain]\[User]. The step did not generate any output. 
The step failed.

Information about the script that is running: It is a VBScript

Dim IEObj 
Set IEObj=CreateObject("InternetExplorer.Application")
IEObj.Navigate "[weblink]/ReplicateFile.asp"
IEObj.visible=false
do Until IEObj.ReadyState=4
loop
IEObj.quit
Set IEObj=Nothing

@mellamokb - The script is down in the general settings as an ActiveX Script, not a T-SQL one, so I am unable to specify an output file for the errors.

Note: I didn't setup anything on this server or the CMS which it is replicating, and my knowledge of databases is fairly low.

Was it helpful?

Solution

My guess is that the page you are displaying in the browser, [weblink]/ReplicateFile.asp, is erroring out on at least one of sessions.

The code

do Until IEObj.ReadyState=4
loop

will cause significant CPU usage while it is running. And, more importantly, if the browser never gets to ReadyState 4, this code will continue to run forever. Have two of three of these stuck, and you will see 100% CPU usage on your server.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top