-
1. Re: Default configuration of open files in Wildfly
mayerw01 Jan 15, 2017 11:00 AM (in response to arkadyz)The MaxFileDescriptorCount may be checked via JConsole (MBeans -> java.lang -> Operating System -> Attributes)
-
2. Re: Default configuration of open files in Wildfly
arkadyz Jan 16, 2017 3:22 AM (in response to mayerw01)I have no GUI packages installed on my machine. May be you can paste here lines of java code Wildfly run to get this info or to lead me where to download relevant source code ?
-
3. Re: Default configuration of open files in Wildfly
ctomc Jan 16, 2017 5:37 AM (in response to arkadyz)Arkady Zelekman wrote:
I have no GUI packages installed on my machine. May be you can paste here lines of java code Wildfly run to get this info or to lead me where to download relevant source code ?
You can do simple mbean lookup for this. that is what io subsystem is doing. see wildfly-core/WorkerAdd.java at 2.x · wildfly/wildfly-core · GitHub
-
4. Re: Default configuration of open files in Wildfly
mayerw01 Jan 16, 2017 5:39 AM (in response to arkadyz)The Java docs provide more details (Standard MBeans (The Java™ Tutorials > Java Management Extensions (JMX) > Introducing MBeans) )
But such a program may be very simple like:
package source;
import java.lang.management.ManagementFactory;
import javax.management.MBeanServer;
import javax.management.ObjectName;
public class TestMbean {
public static void main(String[] args) throws Exception {
ObjectName name = new ObjectName("java.lang:type=OperatingSystem");
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
String attribute = "MaxFileDescriptorCount";
System.out.println(attribute + " = "
+ Long.parseLong(mbs.getAttribute(name, attribute).toString())) ;
}
}
-
5. Re: Default configuration of open files in Wildfly
arkadyz Jan 19, 2017 3:41 AM (in response to mayerw01)Wolfgang, thanks
If I understand correctly from here: OperatingSystemMXBean (Java Platform SE 7 ), this message bean is published by JVM of Wildfly during start.
So, the value of MaxFileDescriptorCount is calculated and by JVM of Wildfly.
Am I understand correctly ?
Thanks.
-
6. Re: Default configuration of open files in Wildfly
arkadyz Jan 19, 2017 3:43 AM (in response to arkadyz)I am also would like to know how this value is calculated. Is it in Wildfly sources or it is in JDK ?
-
7. Re: Default configuration of open files in Wildfly
mayerw01 Jan 19, 2017 5:06 AM (in response to arkadyz)Neither nor. This value shows the hard limits set in your operating system. In Linux you may check the max number of open files via 'prlimit -n'. This shows as well the hard as the soft limits. But you can also use the command 'ulimit -n' to show the soft and 'ulimit -Hn' to show the hard limits. In the man pages you may find more details regarding these commands.
-
8. Re: Default configuration of open files in Wildfly
abhinav.gupta01 Jan 28, 2017 3:00 AM (in response to arkadyz)I assume you want to increase limits.. This properties are not at wildlfy level as pointed already above.
Have a look in below files on you linux box :
1. In /etc/security/limits.conf file add
<usernmae> hard nofile <limitvalue>
<username> soft nofile <limitvalue>
where <username>is the user (login user)2. In /etc/sysctl.conf file add
fs.file-max = 68157440
PS : This will need restart and if you dont see this property , you can add new.
-
9. Re: Default configuration of open files in Wildfly
arkadyz Feb 1, 2017 7:55 AM (in response to mayerw01)'prlimit -n' doesn't work in Red Hat linux. What is the right command in Reh Hat linux ?
Thanks,
Arkady