Lately I had troubles with MongoDB after my database exceeded 2TB and started to constantly complaining about “too many open files“.
In order to fix this issue I appended the following lines to “/lib/systemd/system/mongodb.service”:
[Service]
# Other directives omitted
# (file size)
LimitFSIZE=infinity
# (cpu time)
LimitCPU=infinity
# (virtual memory size)
LimitAS=infinity
# (open files)
LimitNOFILE=64000
# (processes/threads)
LimitNPROC=64000
… and things run smooth again …
UPDATE: Works also perfectly fine with ubuntu 15.10