ASP.NET MVC 2 应用程序池崩溃 - 如何在服务器上调试?
我的应用程序是用 asp.net mvc 2 构建的,有时会崩溃(可能每月一次),错误是服务不可用 503。两次重新启动应用程序池都使应用程序再次工作。由于此错误仅发生在服务器(共享托管)上,我不知道如何调试它。我无权访问事件日志,因此看不到调试它的方法。
有什么建议吗?
更新:
我联系了我的托管提供商,他们向我发送了以下内容:
Windows 服务器中施加的内存限制
问:Windows 是否有 CPU/内存限制/约束 计划?答:是的。经销商类 100MB,个人类 ASP 250MB 商务舱 ASP 为 500MB。问:如果达到内存限制会发生什么?答:如果工人 进程超过私有内存配额,IIS将回收该池 这限制了内存的使用。您对网站的活跃会话可能 过期了。如果您的网站支持身份验证,您将被要求 再次登录。
问:如何查看我的网站的内存限制?答:运行您的网站 您的本地或测试机器有限制并尝试优化 代码。如果超过 250MB 的限制,您应该获得 Business 课程,否则你可以去参加个人课程。
问:如果我的网站超过商务舱 500MB 限制怎么办?答:我们 如果您乘坐商务舱,可以将工作进程增加到 2 个 服务器。如果增加worker进程的数量,负载将会增加 在两个 WP 进程之间均匀共享。
如果内存使用率仍然很高,您应该考虑获取 专用服务器,您可以在其中为您的网站使用不限流量的内存。
我的帐户是个人级 ASP (250MB)。由于我的网站是一个照片库,这可能与生成缩略图有关吗?
谢谢,
伊利亚
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 (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,
Ilija
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当缩略图请求到达服务器时,您是否会动态生成缩略图?如果是,那么您可能需要考虑在上传照片时生成缩略图,然后仅提供较小的图像。
顺便说一句,非常漂亮的照片;-)
PS。尝试在本地计算机上设置内存限制并通过多个请求进行锤击 - 也许您将能够重现它。
Are 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.