简体   繁体   中英

ASP.NET Mvc Website freeze when connecting to external Database

Today I came up with something really strange with our Website. We had performance issues. The Asp.NET Mvc web on IIS 7.5 (Windows 2008) got frozen every X Time. Its a normal E-Commerce system which connects to MSSQL Server on same Infastructure. But When you go into an Detailed page of a Product we ask the Stock via AJAX after page got loaded, we have 2 Warehouses on which we have to ask the Stock.

Today the other warehouse got Server problems and the connection from our e-commerce website to this server (external and simple connection with 1 query to ask the stock) got timedout every connection made to this server. But as I said, this external server isnt involved with nothing more as the query in ajax call.

The strange thing is, all Users (whole IIS Pool) gets frozen when establishing connection to this external server. After connection timeout all requests gets processed, but not until then.

Is it normal? I thought all requests are done in a own "thread". PD its not a Linked Server or something else. Its a direct connection to there and 1 Query, nothing more.

Some suggestions?

There are many reasons that this could happen given the very general description of the architecture and limited diagnostic information provided.

However, one thing comes to mind that is worth checking. There are only so many IIS worker threads and completion ports available. If all (or very many) worker threads end up waiting for the failed connection, there would be no (or few) worker threads available to process other requests.

If you can reproduce the issue in development or QA (by eg intentionally misconfiguring the connection), you could try diagnosing the state of IIS. Check out this guidance:

http://www.orcsweb.com/blog/terri/troubleshoot-iis-application-hangs-unresponsiveness/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM