ASP.NET中的连接池问题
当我的 ASP.NET (3.5) 应用程序部署到客户端服务器时,出现连接池错误。使用查询(来自谷歌搜索),我发现我的一个页面在打开时单独泵送了大约 56 个到服务器的连接,该页面包含一个嵌套的网格视图,并且它具有大约 2600 个主网格数据和 n 的大量数据子网格中的数据数量,客户端中的数据库是sql server 2000,web配置中的最大连接池设置是什么,有没有办法克服这个问题。
i am getting connection pooling error for my asp.net (3.5) application when deployed to the clients server. using a query (from googling) i found out one of my pages alone pumping around 56 connections to the server when it is opened, the page contains a nested gridview and it is having quite a large number of data around 2600 main grid data and n number of data in the child grid, the database in the client is sql server 2000 , what will be max connection pool setting in the web config , is there a way to overcome this problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如 @Mitch 纠正所指出的,更好的解决方案不是调整连接池设置,而是重新设计代码,以便它可以使用单个连接。
当前明显的问题是,您打开的每个连接都应在使用后立即关闭。但更重要的是,您应该考虑以下重构:
As @Mitch correcting pointed out, the better solution is not to adjust connection pooling setting up rather re-design your code so that it can work with single connection.
Current obvious issue is that every connection that you open should be closed immediately after your use them. But more than that you should consider below re-factoring: