I have a self-hosted WF service installed and running as a Windows service. No issues with the service as such but there are times when the service fails to read from the queue (MSMQ endpoint). This happens at random. This is a long running
service that runs for about 18 hours. The service gets called once daily to perform this long running task. We have a scheduler that picks up new data from the DB and queues it, which then gets picked up by the WF service. The service will
be running fine for 2-3 days and then it will stop reading from the queue. I end up having to go to the Services console and stopping and then starting this service.
When I stop the service from the console, it throws an error that the service could not be stopped. It stops at the second attempt. Looking at the event log, I see this:
Failed to stop service. System.ServiceModel.CommunicationObjectFaultedException: The communication object, System.ServiceModel.Activities.WorkflowServiceHost, cannot be used for communication because it is in the Faulted state.
at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)
View Complete Post