Results 1 to 9 of 9
  1. #1
    Join Date
    Dec 2012
    Posts
    6

    Unanswered: Database Connection Timeout/Dropped

    I am a issue which i quite don't understand.
    My sql server is setup to use windows authentication. From time to time one of the applications on that server would have issues connecting to that server. I changed it to use sql authentication and all of a sudden all the problems went away. I would like to hear your thoughts on this and pointers.

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Something broke intermittantly. You found a work around. That's all that we can offer based on the details that you've provided so far.

    The problem is that you haven't given us nearly enough information to help you understand or fix the problem. Because SQL Authentication works, that suggests that communications between the client and the server aren't your issue. Without knowing what broke, when, under what conditions, etc. there isn't a way for us to analyze the failure or suggest a solution.

    If you could at least post the full error messages (all of the text, although changing the names of servers/accounts/etc wouldn't hurt anything), that would help us a lot. Knowing the network topology (how the client and server connect) would be another big help.

    To quote Johnny Five from Short Circuit: "Need input. More input!"

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Dec 2012
    Posts
    6
    Well there is nothing on the SQL Logs indicating any errors or warnings.

    Listed below are application logs for SQL connections.
    2013-01-17 16:15:35,371 DEBUG ConnectionManager:296 - opening JDBC connection [253116260@http-7754]
    Complete query:
    2013-01-17 16:15:54,816 DEBUG HibernateDAOBase:358 - HQL: from Printer p where p.printerName = rinterName and p.deleted = 'N' and p.serverName = :serverName (Params: printerName=KM652F1 - konicaminolta652/602seriespcl, serverName=mspsc) [253116260@http-7754]
    Close SQL connection:
    2013-01-17 16:15:54,848 DEBUG ConnectionManager:317 - closing JDBC connection [253116260@http-7754]

    Server Restart.
    2013-01-17 16:27:48,188 INFO AppServer:124 - Starting application server version: 12.5 (Build 19702), Edition: MF, Platform: Windows Server 2008 R2 - 6.1 (Service Pack 1) 64-bit [runtime: 1.6.0_35-b10 (amd64)], User: SYSTEM [WrapperSimpleAppMain]
    2013-01-17 16:28:29,718 DEBUG ConnectionManager:296 - opening JDBC connection [502509969@http-46]

    Complete query:
    2013-01-17 16:28:29,718 DEBUG HibernateDAOBase:358 - HQL: from Printer p where p.printerName = rinterName and p.deleted = 'N' and p.serverName = :serverName (Params: printerName=DE53F2 - dell 5350dn laser printer, serverName=mspsc) [502509969@http-46]
    Close SQL connection:
    2013-01-17 16:28:29,812 DEBUG ConnectionManager:317 - closing JDBC connection [502509969@http-46]

    2013-01-17 16:28:30,982 DEBUG ConnectionManager:296 - opening JDBC connection [559824849@http-81]

    2013-01-17 16:29:02,279 ERROR JDBCExceptionReporter:72 - An attempt by a client to checkout a Connection has timed out. [559824849@http-81]

  4. #4
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    By any chance, were you having problems, or patch events on the domain controller(s) when you have the problems?

  5. #5
    Join Date
    Dec 2012
    Posts
    6
    Domain controllers were rebooted for patch maintenance.
    Also there was a time update.
    I looked through the logs to see if there was anything significant all i found was a few 5722 in the system log.

  6. #6
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    What I have seen is that if you are using NTLM instead of Kerberos, you will have the SQL Server tied to a particular domain controller. When that controller reboots, it takes a little while for the SQL Server to realize it, and switch to a new one. To see if this is likely your issue, run the following to see what your application is using:
    Code:
    select c.auth_scheme, s.login_name, s.host_name, s.program_name
    from sys.dm_exec_connections c join
    	sys.dm_exec_sessions s on c.session_id = s.session_id

  7. #7
    Join Date
    Dec 2012
    Posts
    6
    Application is using NTLM. I have registered the SPN for the SQL Server Service Account. Is there something else i'm missing.

  8. #8
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    Start with the SPN, and see what changes. Make sure you do this on a test system first, as it does take a few hours for this to take effect.

  9. #9
    Join Date
    Dec 2012
    Posts
    6
    I had manually register the SPN which didn't seem to help. I have updated the Service Account auto update its own SPN. This seems to be working now.

    The only difference is that the port number is added in the auto updated SPN which I believed shouldn't matter.

    Anyways, Thanks all for your help!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •