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: Sunday, August 17, 2014 3:50 AM
Points: 329, Visits: 858
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-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 3:49 PM
Points: 39,886, Visits: 36,233
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: Today @ 3:40 PM
Points: 12,897, Visits: 32,105
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: Friday, September 19, 2014 7:27 PM
Points: 7,107, Visits: 12,657
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
Post #1433478
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse