WARNING: Max 1024 open files allowed, minimum of 40000 recommended. See the Neo4j manua警告:允许最多1024个打

When you restart your service you’ll notice this warning:
当您重新启动服务时,您会注意到此警告:

WARNING: Max 1024 open files allowed, minimum of 40 000 recommended. See the Neo4j manual.
警告:允许最多1024个打开文件,建议最少40000个。看看Neo4j manua
实际上需要最低机器服务

To fix this, edit this file
要解决此问题,请编辑此文件

sudo nano /etc/security/limits.conf
and add these two entries:
并添加这两个条目:

root soft nofile 40000
root hard nofile 40000
neo4j soft nofile 40000
neo4j hard nofile 40000
panos soft nofile 40000
panos hard nofile 40000

I add an entry for all three users root, neo4j
我为所有三个用户添加了一个条目 root, neo4j

and panos, but you actually just need the one that you’ll use when you restart the service. Then edit
而且 panos,您实际上只需要在重新启动服务时使用的那个。然后编辑

sudo nano /etc/pam.d/su

uncomment this line
取消注释这一行

session required pam_limits.so
会话需要pam_limits.so

and restart your server (your machine not the service). //改完要重啟機器

Now if you do
现在,如果你这样做

sudo service neo4j-service restart

the warning should have disappeared.
警告应该已经消失。

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
The error "java socket: too many open files" typically occurs when your Java program reaches the maximum limit of concurrently open files that can be handled by the operating system. This limit is usually determined by the ulimit value set on your system. To resolve this issue, you can take the following steps: 1. Check the current ulimit value by running the command: `ulimit -n`. This will display the maximum number of open files allowed per process. 2. If the current value is too low, you can temporarily increase it by running: `ulimit -n <new_value>`, where `<new_value>` is the desired higher limit. Please note that this change is temporary and will be valid for the current session only. 3. Alternatively, you can permanently increase the ulimit value by modifying the system configuration file. The location of this file varies depending on the Linux distribution you are using. For example, in Ubuntu, you can edit the `/etc/security/limits.conf` file and add a line like this: ``` * hard nofile <new_value> ``` 4. If you're creating multiple socket connections, make sure you close each socket after you're done using it. Failing to close sockets can result in resource leaks and eventually lead to reaching the maximum open file limit. 5. Consider optimizing your code to reuse existing socket connections instead of creating new ones for each request. This can help reduce the number of open files and improve performance. By following these steps, you should be able to resolve the "java socket: too many open files" error.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值