Package.Execute occassionally hangs -
10-04-2004
, 01:41 PM
A custom scheduler for automated execution of DTS is written as a
service in VB.NET. 99% of the time it works wonderfully. We always
force execution in main thread (set on package, after load, before
execute). We execute "processes" made up of 1-15 DTS packages, by
loading them, executing them, one at a time - some quite complex. There
may be 30-40 processes submitted to run each evening. The scheduler
prevents more than one running at a time. But rarely it will hang in a
Data Pump Task. There is no apparent reason for it. Try it a few minutes
later, and it works fine. We make EVERY EFFORT to capture package
events, such as errors, and these do seem to come through fine. We get
no error on hang. When it DOES hang we get no CanceQuery event, and so
it is stuck until we restart our service. One time EVER have we had a
deadlock, and it behaved very much different than this hang.
I suspect the the "Main" for my windows service application may be
incorrect:
' The main entry point for the process
<MTAThread()> _
Shared Sub Main()
Dim ServicesToRun() As System.ServiceProcess.ServiceBase
ServicesToRun = New System.ServiceProcess.ServiceBase() _
{New JobController}
System.ServiceProcess.ServiceBase.Run(ServicesToRu n)
End Sub
Should this perhaps be STAThread ?
Maybe some types of Data Pump Task errors will sometimes HANG rather
than REPORT VIA EVENT when run in a service? Or perhaps with wrong
threading model?
- Lee |