File descriptor limit in java is lower than system default.
<code>ManagementFactory.getOperatingSystemMXBean().getMaxFileDescriptorCount() // 14848
</code>
<code>ManagementFactory.getOperatingSystemMXBean().getMaxFileDescriptorCount() // 14848
</code>
ManagementFactory.getOperatingSystemMXBean().getMaxFileDescriptorCount() // 14848
despite:
<code>ulimit -n # 32768
sysctl -a | grep kern.maxfiles: # 245760
sysctl -a | grep kern.maxfilesperproc: # 122880
launchctl limit maxfiles # maxfiles 32768 unlimited
</code>
<code>ulimit -n # 32768
sysctl -a | grep kern.maxfiles: # 245760
sysctl -a | grep kern.maxfilesperproc: # 122880
launchctl limit maxfiles # maxfiles 32768 unlimited
</code>
ulimit -n # 32768
sysctl -a | grep kern.maxfiles: # 245760
sysctl -a | grep kern.maxfilesperproc: # 122880
launchctl limit maxfiles # maxfiles 32768 unlimited
- For gradle task added:
jvmArgs += ["-XX:-MaxFDLimit"]
: this raised the limit from 10240 to 12544 - In gradle.proparties added
org.gradle.jvmargs=-XX:-MaxFDLimit
: this raised the limit from 12544 to 14848
Both are increments of 2304. What limit can be preventing 32768 from being used and where did those other values come from?