对SQL Server的Ajax请求打开了太多的池化连接

编程入门 行业动态 更新时间:2024-10-27 10:28:21
本文介绍了对SQL Server的Ajax请求打开了太多的池化连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在asp应用程序中实现类似Google的搜索框.框中的每个按键都会向IIS Web方法发送一个Ajax请求,以查询txt并返回匹配项-工作非常酷.但是,在加载活动(例如300个用户)时,我收到100个池化连接已用完的错误消息.现在,我重新考虑一下,也许在每个按键上打开/关闭数据库连接可能太多了.一位架构师将如何对此做出不同的选择,或者确保真正快速地收回连接.我有用于连接的正在使用"构造,以确保它已关闭.令人担心的是,GC可能没有足够快地回收它们?

I'm implementing a Google like search box in my asp application. Each keypress in the box sends an Ajax request to IIS webmethod that queries the txt and return matches - works pretty cool. However, on loading up activity (e.g. 300 users), I'm getting errors that my 100 Pooled connections are used up. Now I'm rethinking that perhaps opening/closing a db connection on each keystroke may be too much. How would one architect this differently, or insure that the connections are reclaimed really fast. I'm have the 'using' construct for connections to insure it is closed. The concern is GC may not be reclaiming them fast enough?

Google如何处理如此大的打开/关闭周期.

How would google handle such a large open/close cycle.

推荐答案

您可能已经这样做了,但为了您的最大利益,也要求始终在自动完成"开始前要求最少字符数检索项目的top(x).

You might be already doing so but it is also in your best interest to require a minimum number of characters before the "autocomplete" kicks in, as well as always retrieve top(x) of items.

更多推荐

对SQL Server的Ajax请求打开了太多的池化连接

本文发布于:2023-11-06 17:48:31,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1564377.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:太多   打开了   SQL   Server   Ajax

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!