I develop a .Net WCF web service hosted as a windows service on Windows XP for development and Windows Server 2003 SP2 for deployment. We install several instances of the service (one for each logical environment) in one machine. After a certain number of instances the windows service fails to startup. The number of services that can be simultaneously running varies. The services run with a specific service account that has local admin rights. I have even created a simple windows service in .Net that does no WCF but just logs a timestamp to a log file and the behaviour is still the same. After certain number of services have been started the next one doesn't start. If I stop one of the running service and then try to start the service that failed it starts up. I am 100% sure it is nothing to do with application code. The number of instances that can be started increases after I reboot the machine but eventually it will hit a limit.
The error message when trying to start up from service control panel is
---------------------------
TestService18.exe - Application Error
---------------------------
The exception unknown software exception (0xc06d007e) occurred in the application at location 0x7c812afb.
---------------------------
OK Cancel
---------------------------
Can anyone give me some ideas on what can be causing this error.
Hmmm... that's an odd one. You're not the only one who has seen this. I suspect you're hitting a child process limit of some kind, but I'm not sure what would be causing it.
I'm definitely not a programmer, but I came across this. Hope it helps.
http://weblogs.asp.net/paolopia/archive/2008/03/23/wcf-configuration-default-limits-concurrency-and-scalability.aspx
The problem is experienced by others as well It is probably due to desktop heap exhaustion. We tried the registry changes suggested but didn't work. Finally our systems guy investigated that the windows 2003 servers has /3GB and /userva boot parameters enabled. Removing these boot parameters and restarting the machines did the trick and all services would startup simultaneously now.