How do SQL Server and IIS work with broken connections?

In an ASP.NET application, what happens if an error occurs when returning the results of a stored procedure.

For instance:

Situation

In the above diagram, an ASP.NET application calls a stored procedure to retrieve some data, the stored procedure executes, and the SQL server tries to send the results.

But what if IIS is not available, what does the SQL server do?

  • Does SQL Server resubmit the results?
  • Is there any time?
  • Is the server storing data somewhere?
  • Does IIS increase sending requests again and again?
+4
source share
2 answers

To answer your questions:

  • Does SQL Server repeat send results over and over?

    No, if the connection between IIS and the SQL server is dead, then SQL will kill the job and report an error.

  • Is there any time?

    The SQL client in your ASP.NET application throws an exception either because the request timed out or because the connection ended.

  • Is the server somewhere data is stored?

    If the stored procedure explicitly uses temporary tables, then there may be some data related to the task that SQL will clean up.

  • Does IIS retry sending the request again?

    Not unless you wrote code for this.

+3
source

SQL Server will log an error around the TDS stream and the package will complete.

+2
source

Source: https://habr.com/ru/post/1346198/


All Articles