I develop an SMS Server that receive SMS, Analysis them and reply to messages. This application developed with entity framework 4.0 and SQLServer 2008.
When I receive SMS I run new thread for that message and analysis and response to message. Each thread has its own new instance of object context and all threads call same stored procedure in SQL Server.
But when large number of SMS arrived to server and number of thread increase, I get one of these 2 error each time:
The underlying provider failed on Open. A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (Provider: TCP Provider, error: 0 - The specified network name is no longer available.)
OR
The underlying provider failed on Open. A connection was successfully established with the server, but then an error occurred during the login process. (Provider: TCP Provider, error: 0 - The specified network name is no longer available.)
I increase Max Pool Size and Connect Timeout to 400 and 150. Can anyone help me?? Thanx
The reason for this common error is that by default MS SQL Server runs in “Windows Authentication mode”. And you will need to change it to “SQL Server and Windows Authentication mode” by following the steps below: Launch SQL Server Management Studio. Log into your SQL Server using Windows Authentication.
Pre-login handshake means IP range needs added to Firewall.
You might try increasing the timeout setting in SQL Server. The default is 10 minutes.
http://msdn.microsoft.com/en-us/library/ms189040(v=sql.105).aspx
Might be because some connections still get available. Try to do this :sp_configure 'user connections', 0
go
reconfigure with override
Also check your server properties, in Connections section
, that your parameter : Maximum number of concurrent connections
is set to 0 (unlimited).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With