特定时间段内的SQL连接超时错误

编程入门 行业动态 更新时间:2024-10-16 16:13:12
本文介绍了特定时间段内的SQL连接超时错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

SQL - 我在特定时间段内收到以下错误 - 例如早上6点到早上6:30 - 代码是某个部门调用的服务的一部分 - 这里有一个商店正在调用Proc并且连接到SQL DB在6:30左右失败(10分钟)

SQL-I am getting following error for particular time period-like 6 am to 6:30 am- The code is a part of a Service which is called by some job-Here one Store Proc is being called and connection to SQL DB getting failed at around 6:30 (for 10 mins)

System.NullReferenceException: Object reference not set to an instance of an object. at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at Hallmark.ProducerPortal.WebServices.VantageBrokerService.SearchAgents(SearchAgentsRequest searchCriteria) in d:\TFS_RETAIL_Builds\31\VUI-RPP\PPWebServices_R22\src\WebServices\VantageBrokerService.asmx.cs:line 102

6; 30之后,相同的代码执行没有任何异常(尽管数据较少) 我尝试过: 我分析了数据库,其他工作是什么,SQL脚本在DB服务器上运行,这可能会占用D的大量内存B.我已经停止了早上6:30左右运行的2个工作(消耗高CPU)。仍然没有工作。

After 6;30, the same code execute without any exception (though with less data) What I have tried: I have analyzed the DB, what are the other jobs, SQL script are running in the DB server which may consume much memory of the DB.I have stopped 2 jobs(which was consuming high CPU) which was running around 6:30 am . Still not working.

推荐答案

只添加了一个答案,从未答复的清单中删除这个问题,因为它已在此处重新发布并回答: 对象引用未设置为对象的实例连接到db ...只发生一段时间 [ ^ ] Only added an answer to remove this question from the unanswered list as it has been reposted and answered here: Object reference not set to an instance of an object while connecting to db...happening for a period of time only[^]

更多推荐

特定时间段内的SQL连接超时错误

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

发布评论

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

>www.elefans.com

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