Database Reference
In-Depth Information
The Unix limitation
Most of the Unix family systems such as OS X and Linux provide a method to limit the
amount of resources that each user and process can use at the moment. The ulimit func-
tion is responsible for managing and applying this limitation.
When the mongod or mongos processes reach the limitation, some errors will show up
and the MongoDB server will crash at that moment. You can simply change the limitation
using the ulimit function.
Both mongod and mongos instances need to connect to other nodes, members and clients,
so it's recommended that you change the limitation manually to prevent problems in the
production and for high throughput.
By using the ulimit -a command, you can see the limitations. The following screen-
shot is an example of using this command:
The ulimit command shows you the limitation per user. So, if you run the mongod or
mongos instances as a user, you will realize that these processes might reach this limita-
tion.
Note
Note that the processes' value (that is, -u) refers to the combined number of distinct pro-
cesses and subprocess threads. This can be accessed at http://docs.mongodb.org/manual/
reference/ulimit/ .
To change the limitation, you can simply use the following command:
ulimit -a 256
After changing the limitation, its better to restart the mongod or mongos instances to ap-
ply the limitation.
Search WWH ::




Custom Search