2

As the title says.

I've found this question: How to increase Neo4j's maximum file open limit (ulimit) in Ubuntu?

But I don't even has this file: /etc/init.d/neo4j-service, I'm guessing it's because I'm using RHEL5, not Debian, as the responder was using.

Then I've added both two lines:

root soft nofile 40000 root hard nofile 40000

into my /etc/security/limits.conf

Then after logging out and logging in again, $ulimit -Sn and $ulimit -Hn still returns 1024,

Also, I don't even has this file: /etc/pam.d/common-session under pam.d directory. Should I create this file myself and just one that one line in here? I don't think this should be the way out.

Any ideas please?

Thanks

Community
  • 1
  • 1
Fisher Coder
  • 3,278
  • 12
  • 49
  • 84

1 Answers1

2

I don't know what is true RHEL way, but you can change the limit using sysctl:

$ sysctl -w fs.file-max=100000

To make the change permanent, add next string to /etc/sysctl.conf:

fs.file-max = 100000

then apply the change using command

$ sysctl -p

Oleksandr Kravchuk
  • 5,963
  • 1
  • 20
  • 31
  • Believe it or not, I don't even has this command, when typing $ sysctl -w fs.file-max=100000, it returns zsh: command not found: sysctl. And the result of $whereis sysctl, I got this: sysctl: /sbin/sysctl /etc/sysctl.d /etc/sysctl.conf /usr/share/man/man2/sysctl.2.gz /usr/share/man/man8/sysctl.8.gz – Fisher Coder Mar 30 '15 at 16:50