IIS Slows down when to many long running requests in .Net
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" />
And how many under this scenario?
iis iis-10
add a comment |
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" />
And how many under this scenario?
iis iis-10
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 '18 at 3:54
@LexLi I edited my question, can you provide further information.
– Henry
Nov 21 '18 at 4:08
add a comment |
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" />
And how many under this scenario?
iis iis-10
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" />
And how many under this scenario?
iis iis-10
iis iis-10
edited Nov 21 '18 at 4:08
asked Nov 21 '18 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 '18 at 3:54
@LexLi I edited my question, can you provide further information.
– Henry
Nov 21 '18 at 4:08
add a comment |
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 '18 at 3:54
@LexLi I edited my question, can you provide further information.
– Henry
Nov 21 '18 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 '18 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 '18 at 3:54
@LexLi I edited my question, can you provide further information.
– Henry
Nov 21 '18 at 4:08
@LexLi I edited my question, can you provide further information.
– Henry
Nov 21 '18 at 4:08
add a comment |
0
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',
autoActivateHeartbeat: false,
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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 '18 at 3:54
@LexLi I edited my question, can you provide further information.
– Henry
Nov 21 '18 at 4:08