This is *not* my windows service failing. I can loop indefinately while tracing to a log file within the service and it will run forever. While calling the mypackage.execute(...) method however, after six minutes (give or take) the exception is thrown...
my code looks something like this:
<code>
dim foo as Microsoft.SqlServer.Dts.Runtime.Application
mypackage = foo..LoadPackage(strimportPkgFilename, pkgevents)
results = myPackage.Execute(Nothing, Nothing, pkgevents, Nothing, Nothing)
</code>
<error>
A first chance exception of type 'System.Runtime.Remoting.RemotingException' occurred in mscorlib.dll
Exception in: frmMyForm.DoImports
Message: Object '/b76f98a0_5bd9_49d8_a524_eeb49d55b303/bqbhkjnaofq_ifr_cwz+srid_1.rem' has been disconnected or does not exist at the server.
</error>
oddly, this same code works perfectly if I run it within a windows form application no matter how long it takes.
It also runs fine if the package can complete in under six minutes.
Any suggestions?
Mark
To give a little update, I'm still having this problem despite exhausting works around I've come up with.
* I've threaded the call to package.Execute, checking its status in a while loop every 60 seconds until it finishes. Still encounter the exception. This behaves as though it should work. The status and execution appear to work asynchronously.
* I've threaded the call to my service, calling my own status function which tests the status of shared MyPackage, every 60 seconds. Still encounter the remoting exception after ~6 minutes.
Every piece is busy making requests through the whole chain of accessible interactions frequently enough to maintain all known remoting timeout constraints and the problem persists.
It confuses me why the same code works in a windows form, but does not work in a windows service. The exception is defiantly being thrown from within package.Execute. I can loop indefinitely within the service without calling package Execute. I can also catch and disregard the exception and still provide status to the client within the service.
Looking for suggestions...
|||
SSIS does not use remoting. The exception is caused by remoting however, so you need to find out who introduced remoting? My ideas
1) you use remoting as link between client and server - then the exception is between the client and the service, which does not fit with the statement that it is thrown from within package.Execute and you can catch this exception (but did you try?)
2) you create multiple application domains in the service - if you do this, make sure you only use SSIS from default application domain. If you run the package from non-default application domain, some SSIS objects can be created in that app domain, but some in default app domain (a lot of SSIS is native code, and it is not aware of app-domains), which may cause failures like this one.
No comments:
Post a Comment