Improving JBoss 5 slow startup

后端 未结 10 1532
情话喂你
情话喂你 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 19:54

    Your suspicion about the jmx-console can be misleading. There may be other components doing work in the background unrelated to the jmx-console. In my experience, we had an issue where a small war file appeared to take 3 minutes to load! It was innocent. The culprit was partly due to an EAR file with many wars and jars.

    While I'm no expert, I would suggest the following:

    1. Try turning up the logging to TRACE. By doing this, I witnessed one of the deployers (EJBDeployer, I think) unnecessarily scanning WARs in one of our EARs. I then manually disabled the scanning of those WAR files.
    2. Run wireshark during the startup. I discovered some war files were hanging while waiting for a response from an external DTD request. Those websites were either now non-existent or would not properly serve the DTD files to java-based programs. I could speed it up by either having the programmers use local DTD files or mirroring those DTDs locally and having /etc/host loopback locally.
    0 讨论(0)
  • 2021-02-01 19:56

    Do you need the JMX console application? Pragmatic thing would be to un-deploy it from the server, you could still use the jconsole or jvisualvm for basically the same thing.

    0 讨论(0)
  • 2021-02-01 19:58

    See http://community.jboss.org/wiki/jboss5xtuningslimming especially the "Tuning" part.

    0 讨论(0)
  • 2021-02-01 19:58

    I suppose you are starting in debug mode. This mode can be up to 3 times slower than normal mode. But there might be also a problem when switching from JDK5 to JDK6. I found this solution here on the net:

    I've solved that. It's a debugging issue. I've changed my debug settings from:

    wrapper.java.additional.26=-Xdebug
    wrapper.java.additional.27=-Xnoagent
    wrapper.java.additional.28=-Djava.compiler=NONE
    wrapper.java.additional.27=-Xrunjdwp:transport=dt_socket,address=7199,server=y,suspend=n
    

    to:

    wrapper.java.additional.26=-Xdebug
    wrapper.java.additional.27=-Xrunjdwp:transport=dt_socket,address=7199,server=y,suspend=n
    

    and JBoss becomes fast again.

    Hope this helps.

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

    That is an awfully big gap in the logs. I suggest changing the log configuration to log everything at DEBUG level, rather than INFO. This will generate an awful lot more log entries, but hopefully will help you narrow it down.

    The easiest way to do this is to set the -Djboss.server.log.threshold=DEBUG system property when you start JBoss

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

    I'm using JBoss 5.1.0 with a Macbook pro (2.26ghz 4gb) without applications it start in 54s

    15:00:26,449 INFO  [ServerImpl] JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221634)] Started in 54s:720ms
    

    I made a new configuration based on the "default". The JMS dataosurce points to a Postgres database instead of the "Hypersonic Database" (in memory database)

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