Network error code 0x2745 occurred while establishing a connection; the connection has been closed


We are facing issue with Intermediate   disconnections between DB and Application

SQL Server version:SQL Server 2008R2 with SP1

Log showing below errors :

Network error code 0x2745 occurred while establishing a connection; the connection has been closed. This may have been caused by client or server login timeout expiration. Time spent during login: total 35904 ms, enqueued 6843 ms, network writes 202053 ms, network reads 6 ms, establishing SSL 31888 ms, negotiating SSPI 0 ms, validating login 1 ms, including user-defined login processing 0 ms. [CLIENT:]
GK GKAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mohammed KhawajaManager - Infrastructure:  Information TechnologyCommented:
Seen this before, problem was caused by Symantec Endpoint Protection Client software.  If you are using Symantec or any other Endpoint protection software, could you disable and try it again.
GK GKAuthor Commented:
Thanks Mohammed

I will wait some more time from experts
Daniel_PLDB Expert/ArchitectCommented:

I don't think SQL Server closes this connection, is it possible that SQL Server loses its connection with domain controller? Have you seen any other errors in the SQL Server error log near those posted here? Please check Windows Security event log for any clues (match date and time with those logged in SQL Server).

As last resort you may turn on 3689 and 4029 trace flags and wait for next error to come. Then get details from SQL Server error log and get back here pasting them. However it is unlikely that SQL Server closes those connections.

DBCC TRACEON (3689,4029,-1)

Open in new window

Ps. You have quite old version of SQL Server, I suggest you to update to SQL Server 2008 R2 SP3.
Your Guide to Achieving IT Business Success

The IT Service Excellence Tool Kit has best practices to keep your clients happy and business booming. Inside, you’ll find everything you need to increase client satisfaction and retention, become more competitive, and increase your overall success.

GK GKAuthor Commented:
Thanks for update,

I verified DBCC TRACESTATUS in Server found below result.

TraceFlag      Status      Global      Session
2861      1      1      0

If I enabled "DBCC TRACEON (3689,4029,-1)" is there any impact in my server ?

Note: Soon I going to update to SP3.

Thanks in advance

Daniel_PLDB Expert/ArchitectCommented:
Why did you enable 2861 trace flag? You can make serious performance problems by enabling this trace flag on a busy system. Therefore  I encourage you to disable it.

Trace flags 3689,4029 enables SQL Server to record detailed error message for login failures. However you shouldn't start from enabling those. First verify SQL Server error log for other messages as well as Windows eventlogs. You can start Profiler trace and track user error message events. If nothing is found then consider enabling flags.
GK GKAuthor Commented:
Thanks for suggestions and quick update.

I will disable 2861 trace flag.
mean while we verified all logs but we did not find any thing in logs  during the time of issue .

Daniel_PLDB Expert/ArchitectCommented:
Can you verify what changed recently that the error is happening?

Time spent during login: total 35904 ms, enqueued 6843 ms, network writes 202053 ms, network reads 6 ms, establishing SSL 31888 ms, negotiating SSPI 0 ms, validating login 1 ms, including user-defined login processing 0 ms.

In your error there is establishing SSL high time, in case of that please verify whether certificate being used is valid and is trusted on the client?

Did you verify also Windows Security event log? Did you verify logs at the client side?
GK GKAuthor Commented:
Thanks for Reply and great support  Daniel .

Here problem is we are facing Intermediate disconnect  issue with only one database among the 180 Databases in the SQL Server instance
This is the reason we are unable to find the root cause why that particular database disconnecting intermediately  connections.

when check trace logs     (2861) we found particular error in Trace logs.

Lot of thanks for support.

Daniel_PLDB Expert/ArchitectCommented:
Ok, that is some more information.
Can you verify whether anything is hanging up with THREADPOOL wait type?

FROM sys.dm_os_wait_stats
WHERE wait_type = 'THREADPOOL'

Open in new window

It is more advanced but you can try to search for connectivity ring buffer:

SELECT CAST(record AS XML) FROM sys.dm_os_ring_buffers

Open in new window

Query will return xmls, just click on each to view details.

Additionally if you have connections to only one db facing issues it may be the specific clients/application failing. It may be wise to verify interconnect between those specific clients\application and you SQL Server instance.
GK GKAuthor Commented:
Hi Daniel,

Below is the result.

wait_type      waiting_tasks_count      wait_time_ms      max_wait_time_ms      signal_wait_time_ms
THREADPOOL      84621                     15280207              24940                               64

Daniel_PLDB Expert/ArchitectCommented:
Dear Snivas,

I suppose you are experiencing these because of long blocking chain, it is highly possible that your trace flag has to do with that. Before getting into deeper analysis I'd recommend you to remove trace flag and update SQL Server to SQL Server 2008 R2 SP3.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GK GKAuthor Commented:
Sure Daniel,

I turnoff trace flag by using
DBCC TRACEOFF (2861, -1);
I will ask patching team to update to SP3.
Daniel_PLDB Expert/ArchitectCommented:
Please verify SQL Server startup parameters also, if that flag is set there it will be turned on after each SQL Server restart. You can modify startup parameters by using SQL Server configuration manager (start->run->sqlservermanager10.msc), reference:
How to: Configure Server Startup Options (SQL Server Configuration Manager)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.