1

I'm receiving a "TooManyOpenFiles" exception. I already added a custom src/main/resources/sysctl.conf:

fs.file-max = 64000

But UnixOperatingSystemMXBean#getMaxFileDescriptorCount() returns still 4096

I guess I'd also have to set the user limit - is there a way to do it in boxfuse?

Jan
  • 2,803
  • 6
  • 36
  • 57

2 Answers2

2

Boxfuse Client 1.26.7.1312 and up now automatically adjust the user limits to match the kernel limits. See https://cloudcaptain.sh/docs/releasenotes#1.26.7.1312 and https://cloudcaptain.sh/docs/payloads/springboot#sysctl

Simply upgrade with boxfuse -u and you should be good to go.

Axel Fontaine
  • 34,542
  • 16
  • 106
  • 137
  • I need to do what the other answer suggests, which is, update the ulimits. is that possible. can we increase the `limits` or do you know what the value is? We are hitting an issue on `Prod` that is basically looking like a lack of FD or some limits that prevents additional sockets from being created even though the instance is not being utilized (slow connections) – Abhishek Dujari May 15 '18 at 14:39
-1

You have to change the ulimit configuration too.

# vim /etc/security/limits.conf

Change or add the lines

*   hard    nofile  1048576
*   soft    nofile  1048576

Instead of using an *, you can put a specific username or a group prefixed with @ (@group)

Then you will have to reboot the system to apply the changes (or use the ulimit command)

zephrax
  • 127
  • 1
  • 1
  • 6