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

查看:134
本文介绍了如何在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-

*     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天全站免登陆