javascript - Very high responsetime after 3 min inactivity Web API -


I have a strange problem in the reproduction and production environment (but not in the god).

I is a website that performs some actions on a web API hosted in the same IIS.

Typically, a specific post takes it under a second to make a request, but after 3 minutes of inactivity, the same post request 10 -30 seconds. (According to Google Chrome Network tab)

The list of requested requests is not the first request for a post request.

The request Ajax is used.

I found out that the database queries were running slow but SQL Profiler has gone to see if all this is performing well, and it seems that the post request is only delayed. All SQL queries are performed directly, and when this is done, there is nothing for 10-30 seconds.

Do you have any idea why the reaction time is too high?

The problem is resolved!

The problem was that the email was sent using the SMTPClient in the request.

The SMTP client is not ASINCC in a web application and therefore had to be sent before returning the POST request.

In this question using the answer from TheCodeKing, make it async:

The solution to the problem!


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -