Queuing Problems for Asynchronous Controllers

0

Hello,

I'm having some problems regarding Asynchronous Controllers because the server's request queuing continues to be blocked for the client during some operation. The routines work exactly, I can execute even parallel functions (for example, I can play 4 parallel searches and wait for them using (await Task.WhenAll (tasks);), however, if the operation takes time and I try to access some other page (some with Controller asynchronous), continue to block and only release the page when the operation ends.

An example: the site has a type of search for products, I did this routine asynchronous, because if the delay the user can enter another page without blocking problem. I was able to go to other pages without blocking during the search, until one day began to block queuing, when this happened I found it strange and as it was in local environment, I decided to restart the application, erasing the cache and history (believing that something related might be affecting). After starting the application again, there was no blocking during the search and everything was working in conceptual mode.

However, today the same problem happened and now in the production environment. I do not know if this could be a problem with threads or with the server itself. I had problems with locks in Controllers that used sessions, but in a

asked by anonymous 18.05.2017 / 03:06

1 answer

0

In case you want to release the resources even if they were not 100% executed, just change

await Task.WhenAll(tasks);

by

await Task.WhaitAll(tasks);
    
19.05.2017 / 19:59