1

I am facing an issue of Too many open Files. OS - Linux Server: JBoss

Below is the ulimit size.

[jboss@cingetsdm004dp ~]$ ulimit -Ha open files (-n) 4096

[jboss@cingetsdm004dp ~]$ ulimit -a open files (-n) 4096

[jboss@cingetsdm004dp ~]$ ulimit -Sa open files (-n) 4096

Also, I had executed ulimit -S Output : unlimited

ulimit -H Output : unlimited

The output of following commands : (Before running a service on JBoss server) List of open Files

  1. lsof | wc -l >/home/equser/Servers/Batch/onstartCount.txt Count : 7719

  2. After running a service for some time, WAR gets undeployed and server.log says Too many open files. Count after too many open files : 7360

Exception : ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015004: Caught exception writing deployment marker file /app/jboss_eQube/jboss-as-7.1.0.Final_MI/standalone/deployments/eQubeMI.war.pending: java.io.FileNotFoundException: /app/jboss_eQube/jboss-as-7.1.0.Final_MI/standalone/deployments/eQubeMI.war.pending (Too many open files)

  • at java.io.FileOutputStream.open(Native Method) [rt.jar:1.7.0_55] at java.io.FileOutputStream.(FileOutputStream.java:221) [rt.jar:1.7.0_55] at java.io.FileOutputStream.(FileOutputStream.java:171) [rt.jar:1.7.0_55] at org.jboss.as.server.deployment.scanner.FileSystemDeploymentService.createMarkerFile(FileSystemDeploymentService.java:887) [jboss-as-deployment-scanner-7.1.0.Final.jar:7.1.0.Final] at org.jboss.as.server.deployment.scanner.FileSystemDeploymentService.access$2600(FileSystemDeploymentService.java:88) [jboss-as-deployment-scanner-7.1.0.Final.jar:7.1.0.Final] at org.jboss.as.server.deployment.scanner.FileSystemDeploymentService$ScannerTask.(FileSystemDeploymentService.java:933) [jboss-as-deployment-scanner-7.1.0.Final.jar:7.1.0.Final] at org.jboss.as.server.deployment.scanner.FileSystemDeploymentService$ScannerTask.(FileSystemDeploymentService.java:922) [jboss-as-deployment-scanner-7.1.0.Final.jar:7.1.0.Final] at org.jboss.as.server.deployment.scanner.FileSystemDeploymentService$UndeployTask.(FileSystemDeploymentService.java:1123) [jboss-as-deployment-scanner-7.1.0.Final.jar:7.1.0.Final] at org.jboss.as.server.deployment.scanner.FileSystemDeploymentService$UndeployTask.(FileSystemDeploymentService.java:1118) [jboss-as-deployment-scanner-7.1.0.Final.jar:7.1.0.Final] at org.jboss.as.server.deployment.scanner.FileSystemDeploymentService.scan(FileSystemDeploymentService.java:386) [jboss-as-deployment-scanner-7.1.0.Final.jar:7.1.0.Final] at org.jboss.as.server.deployment.scanner.FileSystemDeploymentService$DeploymentScanRunnable.run(FileSystemDeploymentService.java:149) [jboss-as-deployment-scanner-7.1.0.Final.jar:7.1.0.Final] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_55] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) [rt.jar:1.7.0_55] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) [rt.jar:1.7.0_55] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [rt.jar:1.7.0_55] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_55] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_55] at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_55] at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.0.0.GA.jar:2.0.0.GA]

Another Exception : JBAS015004: Caught exception writing deployment marker file /app/jboss_eQube/jboss-as-7.1.0.Final_MI/standalone/deployments/eQubeMI.war.isundeploying: java.io.FileNotFoundException: /app/jboss_eQube/jboss-as-7.1.0.Final_MI/standalone/deployments/eQubeMI.war.isundeploying (Too many open files)

Please help me to know, why war is getting undeployed

sForSujit
  • 987
  • 1
  • 10
  • 24
  • For me it looks like the extension for ulimit does not work properly. Please look at https://stackoverflow.com/questions/34588/how-do-i-change-the-number-of-open-files-limit-in-linux . You have monitor the amount of open filse for the jboss process. – Tobias Otto Aug 02 '17 at 11:18
  • Thanks. Issue got resolved, Issues was we are opening too many socket connections which were going in "CLOSE_WAIT" state. When we did connections as pooled connection, issue got resolved. – Shubham Laddha Aug 21 '17 at 08:20

0 Answers0