I use WCF in a fairly demanding environment. One behavior that I have observed is something that I have taken to calling the cold startup. When I first startup a client that is calling a service there seem to be a lot of failures in the first calls. For instance I can watch the first say ten calls go through and then the next 200 calls fail all once. I am talking to the service asynchronously. The service then run and responds fine. I can see that it is an endpoint (potentially) issue not an operation issue since multiple different operations will all fail. It feels like there is a lock and the endpoint stalls and reset itself and is then fine although I have no evidence to back this up.
There are no errors in the server side trace. My client side logs show a lot of the following exception:
System.ServiceModel.CommunicationException: The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error.
I have considered implementing a smoothing algorithm to even out the service calls since there tend to be a lot of them on startup. Has anyone else seen similar behavior? Thanks.
Steve
EDIT: The service is hosted in a Windows Service.
EDIT: Thanks for the comments guys.
I have from the outset set the numbers on the various queues to be pretty high. I have some hard won knowledge about how to scale WCF services. I allow 2048 concurrent connections. I have set the listenBackLog etc...
I implemented a smoothing for the first 1000 calls and that seemed to get it. It may be JIT related but I have no proof about that. For the time being I am going to leave it and see if it reoccurs.