Discussion:
mongod default value for maxConns ?
Joseph Wang
2010-11-02 19:41:37 UTC
Permalink
What is the default value for -maxConns argument? Is there a max value?


$ /usr/local/mongodb-linux-x86_64-1.6.3/bin/mongod -h
...
--slowms arg (=100) value of slow for profile and console log
--maxConns arg max number of simultaneous connections
Alberto Lerner
2010-11-02 20:05:25 UTC
Permalink
There is an arbitrarily high value. In the off chance you hit it, mongod
won't start and will issue the corresponding error.

Alberto.
Post by Joseph Wang
What is the default value for -maxConns argument? Is there a max value?
$ /usr/local/mongodb-linux-x86_64-1.6.3/bin/mongod -h
...
--slowms arg (=100) value of slow for profile and console log
--maxConns arg max number of simultaneous connections
--
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To unsubscribe from this group, send email to
.
For more options, visit this group at
http://groups.google.com/group/mongodb-user?hl=en.
--
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To post to this group, send email to mongodb-user-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to mongodb-user+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
Markus Gattol
2010-11-02 20:20:37 UTC
Permalink
It's 20,000 as of now
http://www.markus-gattol.name/ws/mongodb.html#server_status --->
connections.available
Joseph Wang
2010-11-02 20:43:08 UTC
Permalink
On new server, I see


"connections" : {
"current" : 3,
"available" : 816
},

in db.serverStatus() output.

On old server running with --maxConns 5000, I see

"connections" : {
"current" : 225,
"available" : 19775
},
Doesn't add up to 5000.

I'm running with mongodb-linux-x86_64-1.6.3.



----- Original Message ----
From: Markus Gattol <markus.gattol-***@public.gmane.org>
To: mongodb-user <mongodb-user-/***@public.gmane.org>
Sent: Tue, November 2, 2010 1:20:37 PM
Subject: [mongodb-user] Re: mongod default value for maxConns ?

It's 20,000 as of now
http://www.markus-gattol.name/ws/mongodb.html#server_status --->
connections.available
--
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To post to this group, send email to mongodb-user-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to
mongodb-user+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/mongodb-user?hl=en.
Alberto Lerner
2010-11-02 21:42:40 UTC
Permalink
That's a bug. Could you open a JIRA?

Alberto.
Post by Joseph Wang
On new server, I see
"connections" : {
"current" : 3,
"available" : 816
},
in db.serverStatus() output.
On old server running with --maxConns 5000, I see
"connections" : {
"current" : 225,
"available" : 19775
},
Doesn't add up to 5000.
I'm running with mongodb-linux-x86_64-1.6.3.
----- Original Message ----
Sent: Tue, November 2, 2010 1:20:37 PM
Subject: [mongodb-user] Re: mongod default value for maxConns ?
It's 20,000 as of now
http://www.markus-gattol.name/ws/mongodb.html#server_status --->
connections.available
--
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To unsubscribe from this group, send email to
.
For more options, visit this group at
http://groups.google.com/group/mongodb-user?hl=en.
--
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To unsubscribe from this group, send email to
.
For more options, visit this group at
http://groups.google.com/group/mongodb-user?hl=en.
--
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To post to this group, send email to mongodb-user-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to mongodb-user+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
awsiv
2012-06-19 07:21:22 UTC
Permalink
There doesn't seem to be a definitive answer to this question.

in my case its:
"connections" : {
"current" : 2,
"available" : 817
},

I'm using v2.0.4 (binaries from mongodb website)

I could not find the answer in the official website too. Could someone
please shed some light into this?
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongodb-user-/***@public.gmane.org
To unsubscribe from this group, send email to
mongodb-user+unsubscribe-/***@public.gmane.org
See also the IRC channel -- freenode.net#mongodb
Scott Hernandez
2012-06-19 07:26:18 UTC
Permalink
In the future please create a new topic/thread:

http://www.mongodb.org/display/DOCS/Too+Many+Open+Files

As discussed in many places the issue is that your ulimit for the
number of open files is set to 1024. See the docs above which give
some direction on changing this. Also, searching the group archives
for ulimit will provide other examples, for similar questions.
Post by awsiv
There doesn't seem to be a definitive answer to this question.
"connections" : {
"current" : 2,
"available" : 817
},
I'm using v2.0.4 (binaries from mongodb website)
I could not find the answer in the official website too. Could someone
please shed some light into this?
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To unsubscribe from this group, send email to
See also the IRC channel -- freenode.net#mongodb
awsiv
2012-06-19 07:57:16 UTC
Permalink
I have searched through the forum and in the official website too, and this
thread was the best place I thought would answer my question, because it
exactly asks what I want to know.

I have no troubles with the connections maxing out. I have learnt how to
change the ulimit and mongod max connections. Now, what I want to "know"
is, what value mongod defaults to.

Thanks
Post by Scott Hernandez
http://www.mongodb.org/display/DOCS/Too+Many+Open+Files
As discussed in many places the issue is that your ulimit for the
number of open files is set to 1024. See the docs above which give
some direction on changing this. Also, searching the group archives
for ulimit will provide other examples, for similar questions.
Post by awsiv
There doesn't seem to be a definitive answer to this question.
"connections" : {
"current" : 2,
"available" : 817
},
I'm using v2.0.4 (binaries from mongodb website)
I could not find the answer in the official website too. Could someone
please shed some light into this?
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To unsubscribe from this group, send email to
See also the IRC channel -- freenode.net#mongodb
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongodb-user-/***@public.gmane.org
To unsubscribe from this group, send email to
mongodb-user+unsubscribe-/***@public.gmane.org
See also the IRC channel -- freenode.net#mongodb
Scott Hernandez
2012-06-19 08:09:22 UTC
Permalink
It default to lowest of 80% of open files as defined by ulimit, or
value specified for maxConns, as the max avail number of connections.
maxConns has no default.

The maxium connections allowed are 20000 and that is a hard limit
compiled into the server.
Post by awsiv
I have searched through the forum and in the official website too, and this
thread was the best place I thought would answer my question, because it
exactly asks what I want to know.
I have no troubles with the connections maxing out. I have learnt how to
change the ulimit and mongod max connections. Now, what I want to "know" is,
what value mongod defaults to.
Thanks
Post by Scott Hernandez
http://www.mongodb.org/display/DOCS/Too+Many+Open+Files
As discussed in many places the issue is that your ulimit for the
number of open files is set to 1024. See the docs above which give
some direction on changing this. Also, searching the group archives
for ulimit will provide other examples, for similar questions.
Post by awsiv
There doesn't seem to be a definitive answer to this question.
"connections" : {
"current" : 2,
"available" : 817
},
I'm using v2.0.4 (binaries from mongodb website)
I could not find the answer in the official website too. Could someone
please shed some light into this?
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To unsubscribe from this group, send email to
See also the IRC channel -- freenode.net#mongodb
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To unsubscribe from this group, send email to
See also the IRC channel -- freenode.net#mongodb
Bishwa Shrestha
2012-06-19 08:11:44 UTC
Permalink
Ok that makes sense. Thanks a lot :)
Post by Scott Hernandez
It default to lowest of 80% of open files as defined by ulimit, or
value specified for maxConns, as the max avail number of connections.
maxConns has no default.
The maxium connections allowed are 20000 and that is a hard limit
compiled into the server.
Post by awsiv
I have searched through the forum and in the official website too, and this
thread was the best place I thought would answer my question, because it
exactly asks what I want to know.
I have no troubles with the connections maxing out. I have learnt how to
change the ulimit and mongod max connections. Now, what I want to "know" is,
what value mongod defaults to.
Thanks
Post by Scott Hernandez
http://www.mongodb.org/display/DOCS/Too+Many+Open+Files
As discussed in many places the issue is that your ulimit for the
number of open files is set to 1024. See the docs above which give
some direction on changing this. Also, searching the group archives
for ulimit will provide other examples, for similar questions.
Post by awsiv
There doesn't seem to be a definitive answer to this question.
"connections" : {
"current" : 2,
"available" : 817
},
I'm using v2.0.4 (binaries from mongodb website)
I could not find the answer in the official website too. Could someone
please shed some light into this?
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To unsubscribe from this group, send email to
See also the IRC channel -- freenode.net#mongodb
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To unsubscribe from this group, send email to
See also the IRC channel -- freenode.net#mongodb
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongodb-user-/***@public.gmane.org
To unsubscribe from this group, send email to
mongodb-user+unsubscribe-/***@public.gmane.org
See also the IRC channel -- freenode.net#mongodb
Loading...