日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

server长时间运行query,Ajax刷新被block

發布時間:2024/9/5 编程问答 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 server长时间运行query,Ajax刷新被block 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
最近有個asp.net程序,需要長時間查 詢數據庫,千萬級,且經常有reports同時運行,所以搞不好一個submit就要等1,2個小時。我把sql timeout設成無限,http request timeout設成12個小時,但是不知為什么在production server上總是運行了1.5小時后就出現page can not be displayed,后臺的query則還在運行。但是在我的desktop上運行就沒問題,3,4個小時也可以return results.

OK,那就想辦法吧,誰叫那是production server呢。
第一個想到的當然是創建extra thread,把那個query放到后臺的thread里去,查了查資料,用正規的async thread來做好像有點麻煩。因為是page can not be displayed error, 于是想到如果client page能夠時時的聯系一下server,估計就不會time out.于是就有了第一個方案。
1) create a web page with 2 frames. One is the real aspx page which will do the quer, the other one is just a dummy page that will refresh itself every, say, 1 minute. Well, it does not turn out to be very successful. The dummy refreshing page actually will stop the query aspx page for some unknown reason. So, solution #1 failed.

Then I thought about AJAX. Maybe I can use ajax to keeping talking to the server, while leaving the database query running.
2) find a quick ajax for asp.net 1.1 sample, set the javascript setTimeou() to 1 minute, and use ajax to get the current time from the server every 1 minute. Then, I got the problem as the title of this article: The ajax remote call is blocked when the long running query is running. Not sure how that happens, my guess is the long running query makes the browser TCP client thread busy waiting, and therefore it can not send another ajax request to the server. But anyway, that totally defeats my purpose to use ajax. Maybe there is another way to correctly apply ajax in this situation, but I do not think I have the time to find that out. Solution #2 failed too.
(updated: I tried ajax.net http://www.cnblogs.com/nihgwu/archive/2006/06/04/417161.html and it works, so I am going to stick with Solution #2)

3) Now, I have to go back to the multithreading way in asp.net. Fortunately, it looks like the traditional threading model still works on asp.net, so I do not have to use async thread. I am going to do this tomorrow, it looks doable after a small test, the only problem is I can not use windows integrated security to logon SQL server in the new thread. The thread's execution account is really wierd. It becomes Domain\Machinename$. Never seen that account before. So I have to use SQL server authentication instead.

(This is just to record something I encountered. And I find I am so slow typing Chinese so I switched to English.)

轉載于:https://www.cnblogs.com/cloudjun/archive/2006/06/04/417035.html

總結

以上是生活随笔為你收集整理的server长时间运行query,Ajax刷新被block的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 欧美自拍偷拍一区二区 | 久久午夜夜伦鲁鲁片无码免费 | 蜜臀av性久久久久av蜜臀妖精 | 91麻豆精品国产91久久久久久 | 国产女主播福利 | 超碰伊人网 | 男操女视频在线观看 | 国产女人高潮时对白 | 亚洲精品h | 成人免费黄色 | 国产不卡在线观看视频 | 91天堂在线观看 | 亚洲欧美一区二区三区孕妇 | 337p日本大胆噜噜噜噜 | 97在线播放免费观看 | 香蕉久久夜色 | 欧美顶级黄色大片免费 | 99久久精品国产一区色 | 国产18禁黄网站免费观看 | 素人fc2av清纯18岁 | 免费午夜av | wwwxxx黄色| 精品国产伦一区二区三区 | 精品国产av无码 | 亚洲欧美另类中文字幕 | 一区二区在线免费看 | 国产成人无码一二三区视频 | 精品黄色一级片 | 乱色视频 | 成人福利网站在线观看 | 精品久久久中文字幕 | 国产精品日本一区二区在线播放 | av动态| 高潮无码精品色欲av午夜福利 | 亚洲专区第一页 | 亚洲三级在线 | 国产毛片av | 大象传媒成人在线观看 | 亚洲影院一区二区三区 | av中文字幕亚洲 | 91精品国产综合久久国产大片 | 国产日韩精品一区二区三区在线 | 丰满少妇被猛烈进入高清播放 | 黄色在线小视频 | 久久久精品免费视频 | 日韩精品久 | 国产精品国产三级国产专播品爱网 | 亚洲第一av在线 | 亚洲天堂伊人网 | 图片区 小说区 区 亚洲五月 | 日本不卡在线观看 | 日本精品一二区 | 97超碰免费在线 | 亚洲精品在线视频 | 亚洲第一视频区 | 成人羞羞在线观看网站 | 丝袜一区二区三区 | 日本高清xxxx| 人妻少妇无码精品视频区 | 与亲女洗澡时伦了毛片 | 国产精品无遮挡 | 青青操视频在线 | 视频一区在线免费观看 | 国产人澡人澡澡澡人碰视频 | 日本打白嫩屁股视频 | 操女网站 | 亚洲激情黄色 | 日本黄色片段 | 亚洲一页| 极品白嫩的小少妇 | 98av视频| 蜜桃va| 人妻久久久一区二区三区 | 熊猫成人网| 在线看片黄 | 久久久精品视频在线 | 亚洲码欧美码一区二区三区 | 国产原创视频在线 | 动漫同人高h啪啪爽文 | 欧美一级爽aaaaa大片 | 国产制服91一区二区三区制服 | 91污在线观看| 国精产品一区 | 黄色在线免费观看网站 | 国产群p视频 | 中文字幕免费一区二区 | 男女羞羞在线观看 | 亚洲无人区小视频 | 一道本一区二区 | 成年免费视频黄网站在线观看 | 日韩视频在线一区二区 | 高清毛片aaaaaaaaa郊外 | 天天爱天天操 | 欧美一区二区三区久久妖精 | 一区二区三区在线观看 | 色婷婷av一区二区三区之红樱桃 | 九七影院在线观看免费观看电视 | 久久久久99人妻一区二区三区 | 五月激情四射网 |