特定时间段内的SQL连接超时错误 [英] Sql-connection timeout error for a particular period of time

查看:80
本文介绍了特定时间段内的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连接超时错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆