试图读写受保护的内存问题 [英] Attempted to read and write protected memory issue
问题描述
我们最近将我们的应用程序从Windows server 2003迁移到Windows server 2012.应用程序有两个组件 - 一个是MVC,另一个是带有aspx页面的简单ASP.NET。应用程序工作正常但有时我们收到 - 试图读取和写入受保护的内存。这通常表明其他内存已损坏。
当我检查事件查看器中的错误时,下面是异常:异常信息:异常类型:HibernateException异常消息:创建代理实例失败
当我们收到此错误时,我们通常会回收应用程序池并解决问题。需要您的输入以进行长期修复。
我尝试过:
We recently moved our application from Windows server 2003 to Windows server 2012. Application has two components-- one is MVC and other one is simple ASP.NET with aspx pages. Application is working fine but sometimes we receive-- Attempted to read and write protected memory . This is often an indication that other memory is corrupt error.
When I checked Event Viewer for the error, below is the exception: Exception information: Exception type: HibernateException Exception message: Creating a proxy instance failed
When we get this error, we usually recycle app pool and issue gets resolve. Need your inputs for long term fix.
What I have tried:
We recently moved our application from Windows server 2003 to Windows server 2012. Application has two components-- one is MVC and other one is simple ASP.NET with aspx pages. Application is working fine but sometimes we receive-- Attempted to read and write protected memory . This is often an indication that other memory is corrupt error.
When I checked Event Viewer for the error, below is the exception: Exception information: Exception type: HibernateException Exception message: Creating a proxy instance failed
When we get this error, we usually recycle app pool and issue gets resolve. Need your inputs for long term fix.
推荐答案
有点简单的评论,但万一你是不考虑它:
症状和属性:
1 - 您可以通过修改有限的资源来解决问题。
2 - 你偶尔会收到这条消息。
3 - 可能的原因是,分配失败,让你读/写空指针。
4 - 也许没有错误处理程序来检查这个?
你需要让应用程序池循环作为一项工作 - 不要等待它失败。
陷阱未捕获的错误(如果有的话)。
上述错误通常适用于此类错误;回到'C'时代。
A bit simple-minded a comment, but in case you've not considered it:
Symptoms and Attributes:
1 - You can resolve issue by modifying a resource that's limited.
2 - You only get this message sporadically.
3 - Likely cause, then, is a failed allocation, leaving you reading/writing to a null pointer.
4 - Perhaps no error handler to check for this, either?
You need to have the app pool recycle to occur as a job - not wait for it to fail.
Trap the untrapped error (if any).
The above is generically true for this type of error; going back to the days of 'C'.
除了你自己以外,任何人都无法解决这个问题。您根本没有提供任何有用的信息。
但是,Exception消息中有一个提示:
There is no way for anyone to be able troubleshoot this except yourself. You haven't provided any usable information at all.
But, there is a hint in the Exception message:
Exception information: Exception type: HibernateException Exception message: Creating a proxy instance failed
根据Java文档,HibernateException是大量SQL相关异常的父类。
看起来你正在做一些与任何SQL数据库工作正确相关的东西,可能没有正确关闭某个地方的数据集,连接对象,读者,...任何东西。
根据您提供的信息,这是您将获得的最佳答案。
According to the Java documentation, a HibernateException is the parent class for a ton of SQL related exceptions.
It would appear that you're doing something properly related to any SQL database work, possibly not properly closing a dataset somewhere, a connection object, a reader, ... anything.
With the information you provided, that's the best answer you're going to get.
这篇关于试图读写受保护的内存问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!