I am running Neo4J and Postfix and more services on a Cent OS 7 (I know, we need to update that) based Server.
Due to a warning for starting
a Neo4J instance
(WARNING: Max 1024 open files allowed, minimum of 40000 recommended.)
and to pretty hard-to-track-down fork issues of
Postfix
(the daemon already says: postfix/master[1817]: warning: master_spawn: fork: Resource temporarily unavailable -- throttling and on sending > 80 mails I am getting problems in my shell for any command (top
or ps -aux | grep postfix | wc -l
: -bash: fork: retry: No child processes:)
I am trying to increase the file limit among other measures.
How can I do this with fs.file-max = 40000
in /etc/sysctl.conf when I get the error message (for sudo sysctl -p
): "fs.file-max": No such file or directory?
ulimit
gives
ulimit -Sn
1024
I also have increased the limits in /etc/security/limits.conf:
* soft nproc 65535
* hard nproc 65535
* soft nofile 40000
* hard nofile 40000
but I can also read in this file:
#This file sets the resource limits for the users logged in via PAM.
#It does not affect resource limits of the system services.
I know answers to similar questions, but I did not see a solution for this error message yet.