小编Sta*_*pot的帖子

加载实体时的nhibernate竞争条件

我的webapp中存在nhibernate竞争条件的问题.

我知道在使用旧版本的log4net时会发生这种情况(应该在1.2.10中修复),尽管我也经历过这种情况.因此我们暂时禁用了log4net,因为竞争条件导致IIS崩溃,并且在生产中发生这种情况是不可接受的.这在加载实体时发生(请参阅下面的stacktrace).除此之外,RavenDB中似乎也出现了类似的问题,请参阅此链接,以及没有NHibernate此处链接的示例.

堆栈跟踪:

Server Error in '/' Application.
Probable I/O race condition detected while copying memory. The I/O package is not thread safe by default. In multithreaded applications, a stream must be accessed in a thread-safe way, such as a thread-safe wrapper returned by TextReader's or TextWriter's Synchronized methods. This also applies to classes like StreamWriter and StreamReader.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace …
Run Code Online (Sandbox Code Playgroud)

.net nhibernate race-condition

12
推荐指数
1
解决办法
3493
查看次数

标签 统计

.net ×1

nhibernate ×1

race-condition ×1