零星的 ASP.NET 数据错误:“找不到表 0"

sporadic ASP.NET data error: quot;Cannot find table 0quot;(零星的 ASP.NET 数据错误:“找不到表 0)
本文介绍了零星的 ASP.NET 数据错误:“找不到表 0"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在生产环境中部署了新版本的 ASP.NET 站点后,我每秒记录数十个数据错误,几乎总是出现找不到表 0"错误.我们使用数据集并经常引用 Table[0],虽然我了解在访问 Table[0] 之前检查数据集的表的防御性编码实践,但从来没有过去的一个问题.某个页面将在一秒钟内正常加载,然后下一秒钟就会丢失其中一个数据驱动组件.只是看看这是否会为任何人敲响警钟.

Having deployed a new build of an ASP.NET site in a production environment, I am logging dozens of data errors every second, almost always with the error "Cannot find table 0." We use datasets and frequently refer to Table[0], and while I understand the defensive coding practice of checking the dataset for tables before accessing Table[0], it's never been a problem in the past. A certain page will load fine one second, and then be missing one of its data-driven components the next. Just seeing if this rings a bell for anyone.

更多细节:这次我使用了一个不同的构建服务器,虽然我想编译器设置在两者上是相同的,但我很难想到有一个开关可以使 50%我的数据库调用返回时没有表.我还将项目切换到 VS 2008,但是当我切换回 VS 2005 时,我又恢复了所有这些更改.我注意到构建的程序集有一个新的 MyLibrary.XmlSerializers.dll,它不习惯的地方,但我也无法想象这是造成所有麻烦的原因.(它也不会因调用 MyLibrary 而失败,或者至少不会超过任何其他时间.)

More detail: I used a different build server this time, and while I imagine the compiler settings are the same on both, I have a hard time thinking that there's a switch that makes 50% of my database calls come back with no tables. I also switched the project to VS 2008, but then reverted all of those changes when I switched back to VS 2005. I notice that the built assembly has a new MyLibrary.XmlSerializers.dll, where it didn't used to, but I also can't imagine that that's causing all the trouble. (It also doesn't fall down on calls to MyLibrary, or at least no more than any other time.)

更新添加:我发现麻烦的构建是发布"构建,工作构建被编译为调试".这可以解释吗?

在这些更改修复之前回滚到构建.(重新启动 SQL Server,我们之前尝试过的步骤没有.)

Rolling back to the build before these changes fixed it. (Rebooting the SQL Server, the step we tried before that, did not.)

问题似乎也是基于负载的 - 这在我们的集成和 QA 环境中运行时没有问题,甚至我们的冒烟测试环境 - 指向生产数据的环境 - 在轻负载下也很好.

The trouble also seems to be load-based - this cruised through our integration and QA environments without a problem, and even our smoke test environment - the one that points to production data - is fine under light load.

这是否具有您过去可能见过的任何东西的显着特征?

Does this have the distinguishing characteristics of anything you might have seen in the past?

推荐答案

我见过类似的东西.我相信我们的问题与重复使用失败的会话有关(一旦会话对象失败,它就会进入不良状态并且无法恢复.)我们通过增加会话池的内存和增加网络的频率来修复它应用程序回收.

I've seen something similar. I believe our problem had to do with failed sessions being re-used (once the session object failed it went into a poor state and could not recover.) We fixed it by increasing the memory for the session pool and increasing the frequency of the web application recycling.

它也是由一个新版本引起"的,乍一看似乎没有任何变化来引起这种影响.然而,最终很明显,程序的逻辑是打开和关闭比以前更多的连接(可能多 20%).这个小改动突破了我们之前配置的限制.

It also was "caused" by a new version that at first blush did not seem to have any change to cause such an effect. However, eventually it became clear that the logic of the program was opening and closing a lot more connections (maybe 20% more) than it used to. This small change pushed the limit of our prior configuration.

这篇关于零星的 ASP.NET 数据错误:“找不到表 0"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
how do i pass parameters to aspnet reportviewer(如何将参数传递给aspnet report查看器)
Bind multiple parameters from route and body to a model in ASP.NET Core(在ASP.NET Core中将路由和主体中的多个参数绑定到一个模型)
Custom model binding in AspNet Core WebApi?(AspNet Core WebApi中的自定义模型绑定?)
How to minify in .net core mvc view?(如何在.Net核心MVC视图中缩小?)