Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Time out option on DB Expand / Collapse
Author
Message
Posted Tuesday, March 19, 2013 1:27 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Saturday, April 12, 2014 10:28 AM
Points: 313, Visits: 809
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?
Post #1432875
Posted Tuesday, March 19, 2013 2:38 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 12:20 PM
Points: 41,529, Visits: 34,445
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 2008, MVP
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

Post #1432899
Posted Tuesday, March 19, 2013 2:46 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 2:26 PM
Points: 12,744, Visits: 31,071
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

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1432904
Posted Wednesday, March 20, 2013 2:18 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 9:25 AM
Points: 7,070, Visits: 12,523
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

Believe you can and you're halfway there. --Theodore Roosevelt

Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein

The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein

1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
Post #1433478
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse