解決weblogic啓動慢和創建域慢&線程配置

決weblogic啓動慢和創建域慢的方法2010-08-18 18:33創建域慢啓動慢的特徵:創建域到70%時,進程長時間等待(命令行創建時停止在100%處),創建域啓動Weblogic的時候也是長時間停止。

Weblogic在Linux下啓動慢的原因,發現從進程堆來看,線程掛在security相關的隨機數生成上面,是由於JDK的Bug(JDK從/dev/random讀取‘randomness’經常耗費10分鐘或者更長的時間),查詢了下相關資料,解決辦法可以有如下三種辦法:


1)較好的解決辦法: 在Weblogic啓動參數裏添加 “-

Djava.security.egd=file:/dev/./urandom” (/dev/urandom 無法啓動)

2)最差的解決辦法: 執行命令 mv /dev/random /dev/random.ORIG ; ln /dev/urandom /dev/random

將/dev/random 指向/dev/urandom

3)最好的解決辦法: 修改Linux上Weblogic使用的jdk $JAVA_HOME/jre/lib/security/java.security 文件

將securerandom.source=file:/dev/urandom 修改爲

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

這樣可以解決任何一個域Weblogic啓動慢的問題。

此外由於Weblogic創建域的時候使用的JDK是自帶的jrockit,所以要解決WebLogic在Linux上創建域慢的問題,解決辦法如下: 修改Linux上Weblogic使用的jdk $JROCKIT_HOME/jre/lib/security/java.security 文件

將securerandom.source=file:/dev/urandom 修改爲

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

由於Windows上對/dev/urandom實現機制不一樣,所以在Windows上不會出現上述爲題。

<server>
    <name>AdminServer</name>
 <execute-queue>
      <name>default</name>
      <thread-count>50</thread-count>
      <queue-length-threshold-percent>90</queue-length-threshold-percent> *
      <threads-increase>0</threads-increase>
      <threads-maximum>50</threads-maximum>
      <threads-minimum>10</threads-minimum>
    </execute-queue>
    <ssl>
      <enabled>false</enabled>
    </ssl>
 <use81-style-execute-queues>true</use81-style-execute-queues>  *
    <listen-port>8000</listen-port> 
    <listen-address>172.16.103.51</listen-address>
  </server>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章