如何在 Ubuntu 中增加 Neo4j 的最大文件打开限制 (ulimit)? [英] How to increase Neo4j's maximum file open limit (ulimit) in Ubuntu?

查看:24
本文介绍了如何在 Ubuntu 中增加 Neo4j 的最大文件打开限制 (ulimit)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前 ulimit -n 显示 10000.我想将它增加到 40000.我已经编辑了/etc/sysctl.conf"并将fs.file-max=40000.我还编辑了 /etc/security/limits.conf 并更新了硬值和软值.但是 ulimit 仍然显示 10000.完成所有这些更改后,我重新启动了我的笔记本电脑.我可以访问 root 密码.

Currently ulimit -n shows 10000. I want to increase it to 40000. I've edited "/etc/sysctl.conf" and put fs.file-max=40000. I've also edited /etc/security/limits.conf and updated hard and soft values. But still ulimit shows 10000. After making all these changes I rebooted my laptop. I've access to root password.

usr_name@usr_name-lap:/etc$ /sbin/sysctl fs.file-max
fs.file-max = 500000

/etc/security/limits.conf 中添加以下几行 -

Added following lines in /etc/security/limits.conf -

*     soft    nofile          40000
*     hard    nofile          40000

我还在 /etc/pam.d/su-

session    required   pam_limits.so

我已经尝试了其他论坛上给出的所有可能的方法,但我最多可以达到 10000 的上限,不能超过这个上限.可能是什么问题?

I've tried every possible way as given on other forums, but I can reach up to a maximum limit of 10000, not beyond that. What can be the issue?

我进行此更改是因为 neo4j 抛出最大打开文件限制达到错误.

I'm making this change because neo4j throws maximum open file limits reached error.

推荐答案

我使用的是 Debian,但此解决方案在 Ubuntu 上应该可以正常工作.
您必须在 neo4j-service 脚本中添加一行.
这是我所做的:

I am using Debian but this solution should work fine with Ubuntu.
You have to add a line in the neo4j-service script.
Here is what I have done :

nano/etc/init.d/neo4j-service
start-stop-daemon 之前添加« ulimit –n 40000 »do_start 部分

请注意,我使用的是 2.0 企业版.希望这对你有帮助.

Note that I am using version 2.0 Enterprise edition. Hope this will help you.

这篇关于如何在 Ubuntu 中增加 Neo4j 的最大文件打开限制 (ulimit)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆