ASP.NET MVC 2 app pool crashes - how to debug on server?
My application which was built in asp.net mvc 2 crashes sometimes (maybe once a month), and the error is Service Unavailable 503. Both times restarting app pool made the application work again. Since this error only happens live on the server开发者_如何学JAVA (shared hosting) I don't know how to debug it. I don't have access to event logs so I don't see a way for debugging it.
Any suggestion?UPDATE:
I contacted my hosting provider and they sent me this:Imposed memory limit in Windows servers
Q: Is there a CPU/memory limit/restriction for Windows Plans? A: Yes. 100MB for Reseller Class, 250MB for Personal Class ASP and 500MB for Business Class ASP.Q: What will happen if I hit the memory limit? A: If the worker process exceeds the private memory quota, IIS will recycle that pool which limits the memory usage. Your active sessions to the website may get expired. If your site works on authentication you will be asked to login again.
Q: How can I check the memory limit for my site? A: Run your site in your local or test machine with the limits and try to optimize the codes. If the limit of 250MB is exceeded you should get Business Class, else you can go for Personal Class.
Q: What if my site exceeds the 500MB limit in Business Class? A: We can increase the worker process to 2 if you are in a Business Class server. If the number of worker processes are increased, the load will be evenly shared across both the WP processes.
If the memory usage is still high, you should consider getting a dedicated server where you can use unmetered memory for your website.
My account is Personal Class ASP (250MB). Since my website is a photo gallery, could this be related with generating thumbnails?
Thanks,
IlijaAre you generating thumbnails on the fly when the request for thumbnail comes to the server? If yes, then you might want to consider generating thumbnails when you upload the photo and then just serve smaller images.
Very nice pictures, btw ;-)
PS. Try setting up memory limit on your local machine and hammer it with multiple requests - maybe you will be able to reproduce it.
精彩评论