mongodb not apporave more connections than 208











up vote
0
down vote

favorite












I want to load test mongodb.



the result of command db.serverStatus().connections is



{
"current" : 208,
"available" : 50992,
"totalCreated" : 12643
}


but I cannot open more connections if current connections are 208. Can anyone explain me why there is 50k available connections but more than 208 are refused



I am using python module locust to test and pymongo for client.



this is errors. Simulated 1000 users.



enter image description here



There is 4% failures.



I try to write a script and do not use locust but the same problem here.










share|improve this question
























  • How do you test, and how they are refused?
    – Alex Blex
    Nov 21 at 12:32










  • I will update now
    – Gor
    Nov 21 at 12:34










  • There are too many moving parts between locust and mongodb. Especially without details of locust and mongo setup. IIRC pymongo connection pool is 100, so 208 can be 2x100 from 2 test runners + 8 internal connections between nodes.
    – Alex Blex
    Nov 21 at 13:01










  • Can I increase pymongo connection pool size ?
    – Gor
    Nov 21 at 14:07










  • also I run 100 threads and every thread creates MongoClient instance
    – Gor
    Nov 21 at 14:13















up vote
0
down vote

favorite












I want to load test mongodb.



the result of command db.serverStatus().connections is



{
"current" : 208,
"available" : 50992,
"totalCreated" : 12643
}


but I cannot open more connections if current connections are 208. Can anyone explain me why there is 50k available connections but more than 208 are refused



I am using python module locust to test and pymongo for client.



this is errors. Simulated 1000 users.



enter image description here



There is 4% failures.



I try to write a script and do not use locust but the same problem here.










share|improve this question
























  • How do you test, and how they are refused?
    – Alex Blex
    Nov 21 at 12:32










  • I will update now
    – Gor
    Nov 21 at 12:34










  • There are too many moving parts between locust and mongodb. Especially without details of locust and mongo setup. IIRC pymongo connection pool is 100, so 208 can be 2x100 from 2 test runners + 8 internal connections between nodes.
    – Alex Blex
    Nov 21 at 13:01










  • Can I increase pymongo connection pool size ?
    – Gor
    Nov 21 at 14:07










  • also I run 100 threads and every thread creates MongoClient instance
    – Gor
    Nov 21 at 14:13













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I want to load test mongodb.



the result of command db.serverStatus().connections is



{
"current" : 208,
"available" : 50992,
"totalCreated" : 12643
}


but I cannot open more connections if current connections are 208. Can anyone explain me why there is 50k available connections but more than 208 are refused



I am using python module locust to test and pymongo for client.



this is errors. Simulated 1000 users.



enter image description here



There is 4% failures.



I try to write a script and do not use locust but the same problem here.










share|improve this question















I want to load test mongodb.



the result of command db.serverStatus().connections is



{
"current" : 208,
"available" : 50992,
"totalCreated" : 12643
}


but I cannot open more connections if current connections are 208. Can anyone explain me why there is 50k available connections but more than 208 are refused



I am using python module locust to test and pymongo for client.



this is errors. Simulated 1000 users.



enter image description here



There is 4% failures.



I try to write a script and do not use locust but the same problem here.







mongodb pymongo load-testing locust






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 21 at 12:36

























asked Nov 21 at 12:30









Gor

1,31911028




1,31911028












  • How do you test, and how they are refused?
    – Alex Blex
    Nov 21 at 12:32










  • I will update now
    – Gor
    Nov 21 at 12:34










  • There are too many moving parts between locust and mongodb. Especially without details of locust and mongo setup. IIRC pymongo connection pool is 100, so 208 can be 2x100 from 2 test runners + 8 internal connections between nodes.
    – Alex Blex
    Nov 21 at 13:01










  • Can I increase pymongo connection pool size ?
    – Gor
    Nov 21 at 14:07










  • also I run 100 threads and every thread creates MongoClient instance
    – Gor
    Nov 21 at 14:13


















  • How do you test, and how they are refused?
    – Alex Blex
    Nov 21 at 12:32










  • I will update now
    – Gor
    Nov 21 at 12:34










  • There are too many moving parts between locust and mongodb. Especially without details of locust and mongo setup. IIRC pymongo connection pool is 100, so 208 can be 2x100 from 2 test runners + 8 internal connections between nodes.
    – Alex Blex
    Nov 21 at 13:01










  • Can I increase pymongo connection pool size ?
    – Gor
    Nov 21 at 14:07










  • also I run 100 threads and every thread creates MongoClient instance
    – Gor
    Nov 21 at 14:13
















How do you test, and how they are refused?
– Alex Blex
Nov 21 at 12:32




How do you test, and how they are refused?
– Alex Blex
Nov 21 at 12:32












I will update now
– Gor
Nov 21 at 12:34




I will update now
– Gor
Nov 21 at 12:34












There are too many moving parts between locust and mongodb. Especially without details of locust and mongo setup. IIRC pymongo connection pool is 100, so 208 can be 2x100 from 2 test runners + 8 internal connections between nodes.
– Alex Blex
Nov 21 at 13:01




There are too many moving parts between locust and mongodb. Especially without details of locust and mongo setup. IIRC pymongo connection pool is 100, so 208 can be 2x100 from 2 test runners + 8 internal connections between nodes.
– Alex Blex
Nov 21 at 13:01












Can I increase pymongo connection pool size ?
– Gor
Nov 21 at 14:07




Can I increase pymongo connection pool size ?
– Gor
Nov 21 at 14:07












also I run 100 threads and every thread creates MongoClient instance
– Gor
Nov 21 at 14:13




also I run 100 threads and every thread creates MongoClient instance
– Gor
Nov 21 at 14:13

















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%2f53412079%2fmongodb-not-apporave-more-connections-than-208%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




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53412079%2fmongodb-not-apporave-more-connections-than-208%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

Basket-ball féminin

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

I want to find a topological embedding $f : X rightarrow Y$ and $g: Y rightarrow X$, yet $X$ is not...