SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Time out option on DB


Time out option on DB

Author
Message
SQL_Surfer
SQL_Surfer
SSChasing Mays
SSChasing Mays (651 reputation)SSChasing Mays (651 reputation)SSChasing Mays (651 reputation)SSChasing Mays (651 reputation)SSChasing Mays (651 reputation)SSChasing Mays (651 reputation)SSChasing Mays (651 reputation)SSChasing Mays (651 reputation)

Group: General Forum Members
Points: 651 Visits: 1086
There is an app that connects to DB. If user in the app sits idle for 30 mins or so, it automatically disconnects them from DB. App developer says, there is nothing on the app side that he sets to time out and it must be on the DB side. I checked the DB and AutoClose is false. Is there anything else I can check?
GilaMonster
GilaMonster
SSC Guru
SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)SSC Guru (87K reputation)

Group: General Forum Members
Points: 87413 Visits: 45272
That's not a database setting, get the developer to check the app again. SQL won't automatically close connections (I've left connections open for days or weeks)

Only way it can be on the DB side is if there's a job that someone wrote that's killing connections older than a certain age, someone's manually killing connections or the DB or server is restarting on a regular basis.

Also, check the network between client and server, if that has regular drops it could explain the disconnections.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Lowell
Lowell
One Orange Chip
One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)One Orange Chip (28K reputation)

Group: General Forum Members
Points: 28227 Visits: 39955
have the developer change the application connection string.
both SQLOLEDB and SQLNCLI providers have a default timeout of 30 seconds unless otherwise overridden in the connection string created by the application.

if the connection is from a web server, the web server itself has a session timeout as well; that would explain 20 or 30 minute timeouts better than the connection string.


see http://connectionstrings.com/ for more even more details, but here's an example:

Dim mySqlConnectionFormat As String = "
data source={0};
initial catalog={1};
user id={2};
password={3};
Trusted_Connection=False;
Connect Timeout=600;
Workstation ID=GhostInTheMachine;
Application Name=HaxxorPadPlusPlus;"


Lowell

--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Orlando Colamatteo
Orlando Colamatteo
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14965 Visits: 14396
I think you are either being killed by a database "sweeper" process (see Gail's response) in which case you can see that in the SQL Error Log (look for "kill" in the entry), or you're running into some kind of session timeout (as opposed to a connect or command timeout). If its a session timeout it could be a web server config (as Lowell mentioned) and I have also seen aggressive firewall policies do things like that too.

__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search