Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A transport-level error has occurred... (Existing connection closed by the server) Sql Server 2008

I have a web application which is currently running on Windows XP operating system with SQL Server 2005 database and IIS 6.0.

Now, we are trying to upgrade it to IIS 7.0 on Windows Server 2008 and SQL server 2008 database.

When I run the application then it is throwing "A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)" randomly at different database calls.

I have verified using "sp_who" that only one connection which I am using is opened.

Can anyone tell me, what could be the cause of this issue?

like image 821
Sachin Gaur Avatar asked Jul 10 '09 13:07

Sachin Gaur


People also ask

What is a transport level error?

A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.) Also, find attached screenshot. Thank you in advance.

What causes an existing connection was forcibly closed by the remote host?

​An existing connection was forcibly closed by the remote host​ This error message may occur when migrating a large item (containing large attachments, for instance). ​The Destination system will keep a connection open only for so long, after which the connection will be closed (timeout).


2 Answers

This blog post by Michael Aspengren explains the error message "A transport-level error has occurred when sending the request to the server."

like image 66
Magnus Lindhe Avatar answered Oct 23 '22 00:10

Magnus Lindhe


Maybe the database is set to auto-close? This used to be the default for databases created on the older MSDE/Express edition.

ALTER DATABASE YourDatabaseName SET AUTO_CLOSE OFF;

More:

The SQL Server 2005 Express Edition Overview states:

Features like Auto-Close and the ability to copy databases as files are enabled by default in SQL Server Express ...

I can't remember which service pack changed the default, but the New Database UI in the SP3 version of Management Studio Express defaults the Auto Close setting to false.

like image 36
devstuff Avatar answered Oct 23 '22 01:10

devstuff