Click here to Skip to main content
15,910,471 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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)

C#
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  


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.
Posted
Updated 6-Jun-16 13:06pm

1 solution

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[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900