2

私のアプリケーションはクラスター環境にデプロイされています。最近、サーバーは次のスタックトレースでダウンしました。それはコードから来ているようには見えません。このエラーがポップアップする最近まで、正常に実行されていました。サーバーに大きな変更は加えられていません。誰かがアドバイスできますか?

java.lang.OutOfMemoryError: Java heap space
    at java.lang.AbstractStringBuilder.<init>(AbstractStringBuilder.java:44)
    at java.lang.StringBuilder.<init>(StringBuilder.java:69)
    at java.io.ObjectStreamClass$FieldReflectorKey.<init>(ObjectStreamClass.java:2106)
    at java.io.ObjectStreamClass.getReflector(ObjectStreamClass.java:2039)
    at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:586)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
    at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1591)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
    at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:195)
    at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:565)
    at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:191)
    at weblogic.rmi.internal.dgc.DGCServerImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:479)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:475)
    at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:59)
    at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:1016)
    at weblogic.work.SelfTuningWorkManagerImpl.schedule(SelfTuningWorkManagerImpl.java:126)
    at weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:321)
    at weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:918)
    at weblogic.rjvm.RJVMImpl.dispatchRequest(RJVMImpl.java:1084)
    at weblogic.rjvm.RJVMImpl.dispatch(RJVMImpl.java:1001)
    at weblogic.rjvm.ConnectionManagerServer.handleRJVM(ConnectionManagerServer.java:240)
    at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:877)
    at weblogic.rjvm.MsgAbbrevJVMConnection.dispatch(MsgAbbrevJVMConnection.java:446)
    at weblogic.rjvm.t3.MuxableSocketT3.dispatch(MuxableSocketT3.java:368)
    at weblogic.socket.AbstractMuxableSocket.dispatch(AbstractMuxableSocket.java:383)
    at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:872)
4

5 に答える 5

8

メモリが不足しています。次のいずれかが考えられます。

  • プロセスにより多くのメモリを与える必要があります ( -Xmxjava コマンド ライン オプションを使用)。また
  • メモリリークがあります

これ以上の情報がなければ、どちらが正しいかはわかりません。のスタック トレースは、OutOfMemoryErrorヒープが使い果たされた時点を示すだけなので、めったに役に立ちません。ヒープがいっぱいになっている理由はわかりません。

于 2011-05-19T10:27:01.580 に答える
1

サイモン・ニッカーソンの答えは正しい

追加するだけで、スタック トレースは weblogic.socket.SocketMuxer.readReadySocketOnce から始まります。これは、着信リクエストを受け入れる内部 weblogic クラスです。したがって、これはサーバーがリクエストを受け入れるのに十分なメモリを持っていないことを意味します。

于 2011-05-19T10:58:49.657 に答える
1

Are you using the JRockit JVM? If you are you can use JRockit Mission Control and monitor the Java heap usage. You can also use the JRockit Flight Recorder to record JVM events for offline analysis. There is an Oracle webcast on this here: http://www.vimeo.com/22109838. You can skip to 4:54 which is where the overview of JRockit, WLDF and JRF starts.

Keep in mind that when the heap is full it is the NEXT operation that fails with the OutOfMemory Exception, and therefore this stack trace may not indicate any cause of the failure. This simply indicates that when this code ran there wasn't enough heap, not that this code caused the heap to fill up.

** Edits...

Clearly the server is out of memory - at the time of this specific operation. The question is... why? This stack trace doesn't tell you -why- it just indicates that whatever was happening at the time could not complete because there was not enough memory available at that time. This does not mean that it is the cause of the problem.

Sure, you can add more memory but that may not fix the problem - it may only take longer for it to appear.

于 2011-05-19T14:50:05.810 に答える
0

set catalina.sh/bat find set JAVA_OPTS=%JAVA_OPTS% あなたのRAMが何であれ - 調整しますが、RAMの半分以上を与えないでください set JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG% -server -Xms512M -Xmx512M -XX:MaxPermSize=256M

于 2011-05-19T12:24:34.460 に答える