Click here to Skip to main content
15,902,938 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi,

We have a map producing windows service on the web server. Our web application uses this windows service to get the map images and produce to the client. As per license we can have 2 map servers from this service. When I was stress testing this web application, the windows service was getting locked. I put near about 20 users for 10 minutes, 2 users ramp up at every 1 minute. In the web application we take care of releasing the map server after it has been consumed. When we do zoom, pan etc map server is used for each action we release it. But under the stress test, we get server thread abort exception and in the windows event viewer on the web server we get httprequest timed out exception. So after stress test of 10 minutes again we have to restart the map producing windows service. How can this be resolved? I tried to put the windows service to restart after 1st failure, 2nd failure and there after under the windows service recovery option. But it doesnt restart.

regards

Vijay
Posted

If you get an exception that stops the service, log the exception, reset everything, and restart the service from the catch block.
 
Share this answer
 
Comments
vjvjvjvj 23-Jan-11 16:31pm    
thanks John
One solution we've used in the past was to have a monitoring service that would be responsible to check that the main service is running fine. If it notices any issues, it restarts the main service. In your case since you don't want this to be done on a polling basis, you could have your web-app request the maintenance service to restart the main service (if it finds that the main service is down).
 
Share this answer
 
Comments
vjvjvjvj 23-Jan-11 16:32pm    
Thanks Nish
Nish Nishant 23-Jan-11 18:21pm    
You're welcome.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900