Remoting exception for long running templates


I have a template that runs overs large database (meta data copied to local XML to make it faster) however it takes more than 15 minutes to generate and throws a remoting exception.

I also have my templates divided into smallest chunk to avoid this but now this is cannot be avoided. Please help.

Error 4 An Exception was thrown while processing the template. The following Exception was thrown:
System.Runtime.Remoting.RemotingException: Object '/265063eb_8c1d_457a_ba7a_d56c31bdba13/_wozpwyoslzha+n2u26e08hn_79.rem' has been disconnected or does not exist at the server.

Server stack trace:
at System.IServiceProvider.GetService(Type serviceType)
at T4Toolbox.TransformationContext.GetService(Type serviceType)
at T4Toolbox.TransformationContext.UpdateOutputFiles()
at T4Toolbox.TransformationContext.Dispose(Boolean disposing)
at T4Toolbox.TransformationContext.Cleanup()