Improving JBoss 5 slow startup

后端 未结 10 1534
情话喂你
情话喂你 2021-02-01 19:49

We upgraded from JBoss 4 (and JDK 5) to JBoss 5 (and JDK 6). The problem is that the start time has gone from 1.5 minutes (on JBoss 4) to more than 4 minutes.

1         


        
相关标签:
10条回答
  • 2021-02-01 20:16

    A shot into the blue sky without more information

    • Network timeouts: 1,5 minutes of delay when deploying jmx-console.war may indicate a network timeout (e.g. 3 x 30 seconds). Try to start JBoss and bind it to a specific IP address using the -b command line argument or the jboss.bind.address system property. Also, try to make sure your host and DNS resolution settings on your system are correct.

    • JMX is also using RMI and you may want to set the RMI server host name as system property. On some Linux distributions, RMI has problems with looking up the correct hostname and jmx-console.war may try to connect to the 'wrong localhost'. The system property is java.rmi.server.hostname

    • System tracing: If that does not help, you may want to use strace to start the java process, so you can see the point where the system hangs (if it really does hang due to a network timeout or similar).

    0 讨论(0)
  • 2021-02-01 20:17

    I had an issue like this but I found a good improvement by setting the initial and max heap size to same values, I mean:

     -Xms512m -Xmx512m
    

    With this, I improved from 4 to 2 minutes the starting time.

    0 讨论(0)
  • 2021-02-01 20:17

    You could refer to this link to avoid unnecessary annotation scanning which could speedup your server start

    0 讨论(0)
  • 2021-02-01 20:18
    1. Turn off annotation scanning and other features you don't need https://community.jboss.org/wiki/jboss5xtuningslimming

    2. When you start/stop JBoss from eclipse, it does not clean up the tmp & work folders correctly. Setup an External Tool configuration and run a batch file to delete everything in tmp & work folders before each startup.

    I was able to speedup running the "default" profile from 15/20 minutes to 5 minutes.

    0 讨论(0)
提交回复
热议问题