Score:0

Connection problems between servers - Application (IIS) - SQL Server

in flag

I created a web application (ASP.NET Core MVC) which retrieves large amounts of data from the SQL server. The application is installed in a server (A) with IIS 6.2 and Windows Server 2012R2, while the SQL server is installed in another server (B) with MS SQL Server 2014 and also Windows Server 2012R2.

When this application is installed in the server A, the retrieval of large amounts of data returns the error:

502 - Web server received an invalid response while acting as a gateway or proxy server.
There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.

When the application is running in my own computer with connection to the SQL of server B, no error is returned and the task completes successfully.

Is it a timeout or priority error? No error is returned in the Event Viewer of both server A and server B. Is it a configuration of server A (IIS or other)?

Note: the other applications in the server function normally.

Note: the log of the application has the following kind of messages:

warn: Microsoft.EntityFrameworkCore.Query[20500]
The LINQ expression 'where {from String q in __8__locals1_Geobricks_2 where [l].Geobrick.StartsWith([q]) select [q] => Any()}' could not be translated and will be evaluated locally.
Score:0
in flag

The problem was solved with the optimization of the SQL queries.

I managed to shorten the data retrieved from the SQL server with the inclusion of WHERE clauses not previously included in the SQL command submitted to the SQL server.

I didn't try, but possibly I could set the command timeout to a larger time...

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.