当多个用户同时访问我的Web应用程序时出错 [英] Error when multiple users access my web app at the same time
问题描述
我正在使用.Net 2008和Oracle 10g作为数据库.我遇到的问题是在IIS中部署应用程序后,当多个用户一次访问同一页面时,我遇到了错误.无法获得输出.
I'm using .Net 2008 and Oracle 10g as my database. The problem I'm getting is after deploying the application in IIS, when multiple users access the same page at a time i'm getting the error. Can't get the output.
注意:两个用户一次访问相同的页面,相同的菜单.
Note: Both the users accessing the same page, same menu at a time.
我该如何解决?
推荐答案
我的猜测是一个标准的线程安全/同步错误,很可能是由于某些静态资源(例如静态连接)引起的.显然,这是纯粹的猜测,不需要更多代码,但是(一个高度线程化的网站)是一个令人惊讶的常见疏忽.
My guess would be a standard thread-safety / synchronization bug, most likely due to some static resource such as a static connection. Obviously this is pure speculation without some more code, but it (=web-sites being highly threaded) is a surprisingly common oversight.
如果是是静态资源,那么...嗯,它可能不应该是静态的.每个请求,或者(特别是在连接的情况下)都以本地代码为范围(并让连接池担心重用).
If it is a static resource, then... well, it probably shouldn't be static. Either per-request, or (specifically in the case of connections) scoped to the local code (and let the connection-pooling worry about re-use).
这篇关于当多个用户同时访问我的Web应用程序时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!