如何增加 boxfuse 中打开文件的用户限制?

How to increase the open files user limit in boxfuse?

我收到 "TooManyOpenFiles" 异常。我已经添加了自定义 src/main/resources/sysctl.conf:

fs.file-max = 64000

但是UnixOperatingSystemMXBean#getMaxFileDescriptorCount()returns还是4096

我想我还必须设置用户限制 - 有没有办法在 boxfuse 中做到这一点?

你也必须更改 ulimit 配置。

# vim /etc/security/limits.conf

更改或添加行

*   hard    nofile  1048576
*   soft    nofile  1048576

除了使用 *,您可以输入特定的用户名或以 @ (@group) 为前缀的组

然后您必须重新启动系统才能应用更改(或使用 ulimit 命令)

Boxfuse Client 1.26.7.1312 及更高版本自动调整用户限制以匹配内核限制。参见 https://cloudcaptain.sh/docs/releasenotes#1.26.7.1312 and https://cloudcaptain.sh/docs/payloads/springboot#sysctl

只需使用 boxfuse -u 升级即可。