IIS Slows down when to many long running requests in .Net











up vote
0
down vote

favorite












I have an API Service, that sometimes takes a while to spit out the answer, like maybe 120 to 200 seconds. Most of the time the answer will be produced in 1 to 5 seconds.



When there are let's say 20 requests to IIS that have long-running answers between 120 - 200 seconds. All the other incoming requests seem to take much longer to process and everything gets real slow until those 20 requests produce results.



I have the application pool set 50,000 concurrent requests, but I see this behaviour with as little as 100 x 200 requests and then the requests keep growing until the long running ones complete.



I was under the impression that all requests will run normally and independently of one another. And a few shouldn't slow down the rest. The CPU on the machine never churns over 1%.



Is there anything I might be overlooking? Configuration wise?



After reading lex li answer, and setting the max worker threads might help, how many CPU's is this considered?



And how many worker threads will this enable?



<processModel autoConfig="false" requestQueueLimit="100000" maxWorkerThreads="200" maxIoThreads="200" minWorkerThreads="50" minIoThreads="50" />


How many CPU's is this?



And how many under this scenario?



enter image description here










share|improve this question




















  • 1




    That's exactly what ASP.NET programming model does not well support support.microsoft.com/en-us/help/821268 You need to redesign your app to get rid of those long running bits (moving to a separate process via message queue or other IPCs).
    – Lex Li
    Nov 21 at 3:54










  • @LexLi I edited my question, can you provide further information.
    – Henry
    Nov 21 at 4:08















up vote
0
down vote

favorite












I have an API Service, that sometimes takes a while to spit out the answer, like maybe 120 to 200 seconds. Most of the time the answer will be produced in 1 to 5 seconds.



When there are let's say 20 requests to IIS that have long-running answers between 120 - 200 seconds. All the other incoming requests seem to take much longer to process and everything gets real slow until those 20 requests produce results.



I have the application pool set 50,000 concurrent requests, but I see this behaviour with as little as 100 x 200 requests and then the requests keep growing until the long running ones complete.



I was under the impression that all requests will run normally and independently of one another. And a few shouldn't slow down the rest. The CPU on the machine never churns over 1%.



Is there anything I might be overlooking? Configuration wise?



After reading lex li answer, and setting the max worker threads might help, how many CPU's is this considered?



And how many worker threads will this enable?



<processModel autoConfig="false" requestQueueLimit="100000" maxWorkerThreads="200" maxIoThreads="200" minWorkerThreads="50" minIoThreads="50" />


How many CPU's is this?



And how many under this scenario?



enter image description here










share|improve this question




















  • 1




    That's exactly what ASP.NET programming model does not well support support.microsoft.com/en-us/help/821268 You need to redesign your app to get rid of those long running bits (moving to a separate process via message queue or other IPCs).
    – Lex Li
    Nov 21 at 3:54










  • @LexLi I edited my question, can you provide further information.
    – Henry
    Nov 21 at 4:08













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have an API Service, that sometimes takes a while to spit out the answer, like maybe 120 to 200 seconds. Most of the time the answer will be produced in 1 to 5 seconds.



When there are let's say 20 requests to IIS that have long-running answers between 120 - 200 seconds. All the other incoming requests seem to take much longer to process and everything gets real slow until those 20 requests produce results.



I have the application pool set 50,000 concurrent requests, but I see this behaviour with as little as 100 x 200 requests and then the requests keep growing until the long running ones complete.



I was under the impression that all requests will run normally and independently of one another. And a few shouldn't slow down the rest. The CPU on the machine never churns over 1%.



Is there anything I might be overlooking? Configuration wise?



After reading lex li answer, and setting the max worker threads might help, how many CPU's is this considered?



And how many worker threads will this enable?



<processModel autoConfig="false" requestQueueLimit="100000" maxWorkerThreads="200" maxIoThreads="200" minWorkerThreads="50" minIoThreads="50" />


How many CPU's is this?



And how many under this scenario?



enter image description here










share|improve this question















I have an API Service, that sometimes takes a while to spit out the answer, like maybe 120 to 200 seconds. Most of the time the answer will be produced in 1 to 5 seconds.



When there are let's say 20 requests to IIS that have long-running answers between 120 - 200 seconds. All the other incoming requests seem to take much longer to process and everything gets real slow until those 20 requests produce results.



I have the application pool set 50,000 concurrent requests, but I see this behaviour with as little as 100 x 200 requests and then the requests keep growing until the long running ones complete.



I was under the impression that all requests will run normally and independently of one another. And a few shouldn't slow down the rest. The CPU on the machine never churns over 1%.



Is there anything I might be overlooking? Configuration wise?



After reading lex li answer, and setting the max worker threads might help, how many CPU's is this considered?



And how many worker threads will this enable?



<processModel autoConfig="false" requestQueueLimit="100000" maxWorkerThreads="200" maxIoThreads="200" minWorkerThreads="50" minIoThreads="50" />


How many CPU's is this?



And how many under this scenario?



enter image description here







iis iis-10






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 21 at 4:08

























asked Nov 21 at 3:48









Henry

2,34011425




2,34011425








  • 1




    That's exactly what ASP.NET programming model does not well support support.microsoft.com/en-us/help/821268 You need to redesign your app to get rid of those long running bits (moving to a separate process via message queue or other IPCs).
    – Lex Li
    Nov 21 at 3:54










  • @LexLi I edited my question, can you provide further information.
    – Henry
    Nov 21 at 4:08














  • 1




    That's exactly what ASP.NET programming model does not well support support.microsoft.com/en-us/help/821268 You need to redesign your app to get rid of those long running bits (moving to a separate process via message queue or other IPCs).
    – Lex Li
    Nov 21 at 3:54










  • @LexLi I edited my question, can you provide further information.
    – Henry
    Nov 21 at 4:08








1




1




That's exactly what ASP.NET programming model does not well support support.microsoft.com/en-us/help/821268 You need to redesign your app to get rid of those long running bits (moving to a separate process via message queue or other IPCs).
– Lex Li
Nov 21 at 3:54




That's exactly what ASP.NET programming model does not well support support.microsoft.com/en-us/help/821268 You need to redesign your app to get rid of those long running bits (moving to a separate process via message queue or other IPCs).
– Lex Li
Nov 21 at 3:54












@LexLi I edited my question, can you provide further information.
– Henry
Nov 21 at 4:08




@LexLi I edited my question, can you provide further information.
– Henry
Nov 21 at 4:08

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53404997%2fiis-slows-down-when-to-many-long-running-requests-in-net%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53404997%2fiis-slows-down-when-to-many-long-running-requests-in-net%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Berounka

Sphinx de Gizeh

Different font size/position of beamer's navigation symbols template's content depending on regular/plain...