Click here to Skip to main content
15,891,248 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
we are getting connection time out in our application for 2-3times intially when we use,after this the application is working fine for whole day.this is getting repeated for everyday.

application is hitting our test db server,no of users are also very less

my observations

->i can't see any time out error in log

->no blockings and deadlocks

->remote login timeouts &remote query timeout run value are set to 1000

->in application connection time out is set to zero and command time out set to 240,i have tried both with zero but it didn't worked

->cpu and memory utilization are also normal

server is on SQL 2012

could some one help me on this to overcome the initial time out error in application and the things which need to be modified or monitored from DB end
Posted
Comments
renish patel 7-Oct-14 7:33am    
You used database from Network? If yes,then check your network connectivity.
PhilLenoir 7-Oct-14 8:59am    
Have you tried looking at your network itself? Could you have a noisy card or port? Are any other network accesses occasionally slow? CPU/memory on both client and server?

You could try a packet sniffer (on both client and server).
jkirkerx 7-Oct-14 16:15pm    
Did you look at the event log on the sql server, and check for SQL messages?
Member 11135033 7-Oct-14 23:59pm    
network connectivity is fine,i couldn't find any error message in logs aswell

1 solution

That's like finding a needle in the haystack because you are not able to get a general idea of where to look.

1. So look at your event logs in the database server first.
2. Check your code, do you open the database just in time, and then close it.
3. Check your application design, or poorly written SQL, streamline functions to access the server less.
4. Sometimes you have to change the settings on the Microsoft SQL Server to sort of create an open connection for a longer period of time.

Consider this
http://stackoverflow.com/questions/312702/is-it-safe-to-keep-database-connections-open-for-long-time[^]

I can say that when you figure it out, that may never happen again on your watch.

FYI:
I had a similar error last week, but it was due to the Veeam Backup Software that brought the server offline for a minute to do a full backup.
 
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