Speed up Weblogic Server startup times

前端 未结 8 905
旧时难觅i
旧时难觅i 2021-02-01 18:24

At my work, we use Weblogic Server to host an enterprise portal. Which is fine.

However, I\'ve recently had the opportunity to use Tomcat for some side projects, and I a

相关标签:
8条回答
  • 2021-02-01 18:50

    As Tomas F and krosenvold suggested it may be for the random number generator.

    On the standard startup of Weblogic 12.2.1 I got this message :

    Disabling the CryptoJ JCE Provider self-integrity check for better startup performance. 
    To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true
    

    So I specified it and it cut the startup time in half. About 13 seconds on a clean domain.

    0 讨论(0)
  • 2021-02-01 18:54

    If you use Weblogic workshop, then you just need to publish, not restart the application server while doing iterative development.

    0 讨论(0)
  • 2021-02-01 18:56

    On the memory consumption issue, you might want to try setting the memory parameters of the JVM used by your WebLogic server. Log in to your WL Web Admin Console and go to Environment/Servers/[your server]/Configuration/Server Start and, on the "Arguments", setting something like -Xms256m -Xmx256m will set your JVM's initial (Xms) and maximum (Xmx) heap size to 256 megabytes. You will want to play around with these numbers and find the best values for your environment. But please be aware that your Eclipse instance might be consuming a lot of memory as well.

    Regarding the startup time, although a bit larger than I would expect, they seem OK. This problem is very frequent, and I don't think you will be able to definitely solve it. WebLogic has much more features than Tomcat, and this reflects in other characteristics of the environment (like startup time).

    Turns out Weblogic uses random number generator during start up. Because of the bug in java it reads ‘randomness’ from /dev/random. /dev/random is very good random numbers generators but it is extremely slow. It takes sometimes 10 minutes or more to generate one number. /dev/urandom is not that good, but it is instant. Java somehow maps /dev/urandom file to /dev/random. That’s why default settings in $JAVA_HOME/jre/lib/security/java.security are useless.

    Possible solutions: 1) Add “-Djava.security.egd=file:/dev/./urandom” (/dev/urandom does not work) to java parameters.

    Worse but working solution is: 2) mv /dev/random /dev/random.ORIG ; ln /dev/urandom /dev/random

    3) Best solution is to change $JAVA_HOME/jre/lib/security/java.security Replace securerandom.source with

    securerandom.source=file:/dev/./urandom

    This problem does not happen under windows because it uses different implementation of /dev/random.

    It takes seconds to start weblogic server now.

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

    Please check that the lengthy startup time is actually due to WebLogic Server startup and not WebLogic Portal startup time.

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

    As krosenvold said, the random number generation can cause slow startup.

    The recommendation from Oracle is to use one of the -D flags below - only on non-production systems since it lessen security.

    Use -Djava.security.egd=file:///dev/urandom switch or file:/dev/./urandom to the command that starts weblogic.

    The information above is taken from http://download.oracle.com/docs/cd/E12839_01/doc.1111/e14772/weblogic_server_issues.htm#CIHIIBGJ

    If the -D flag doesn't work, look at the following solution: http://www.itonguard.com/20090313/weblogic-starts-slow/

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

    You haven’t mentioned what level and what platform but the WebLogic Server Performance and Tuning guide contains a number of hints and tips that may help you.

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