Page History
Sv translation | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
Monitor application server's Java processAs BellaDati is a Java application run on the application server and JVM tools like VisualVM can be used for monitoring the BellaDati's usage of memory, threads, etc. and can be a source of valuable information in solving performance issues. There are 2 ways how the VisualVM can connect to the Java process of the running application server which host BellaDati:
Enable JMXTo enable JMX connection to the Java process running application server following JVM options need to be added to it:
Once JVM options are added and application server is restarted, VisualVM can be connected to it by creating JMX connection to <server-address>:9010. In case the port is not publicly available and SSH connection is possible, port can be made available by port forwarding, e.g. on Linux based systems via:
Collect GC LogsIn case of memory issues, Java process running application server can be configured to collect garbage collection (GC) logs as well as to generate a heap dump in case of OutOfMemoryError. Also, switching the type of garbage collection algorithm can improve performance. To enable GC logs generation and heap dump generation as well as switch GC algorithm to G1 add following JVM options in the application server:
where
|
Sv translation | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
アプリケーションサーバーのJavaプロセスを監視するBellaDatiはアプリケーションサーバー上で実行されるJavaアプリケーションであり、VisualVMなどのJVMツールを使用して、BellaDatiのメモリやスレッドなどの使用状況を監視でき、パフォーマンスの問題を解決するための貴重な情報を得ることができます。 VisualVMがBellaDatiをホストする実行中のアプリケーションサーバーのJavaプロセスに接続する方法は2つあります:
JMXを有効にするアプリケーションサーバーを実行しているJavaプロセスへのJMX接続を有効にするには、次のJVMオプションを追加する必要があります:
JVMオプションが追加され、アプリケーションサーバーが再起動されると、<server-address>:9010 へのJMX接続を作成することにより、VisualVMをそれに接続できます。ポートが公開されておらず、SSH接続が可能な場合は、ポートフォワーディングによってポートを使用可能にすることができます: 例: Linuxベースのシステム
GCログを収集するメモリの問題が発生した場合、アプリケーションサーバーを実行しているJavaプロセスは、ガベージコレクション (GC) ログを収集し、OutOfMemoryErrorの場合にヒープダンプを生成するように構成できます。また、ガベージコレクションアルゴリズムのタイプを切り替えると、パフォーマンスを向上させることができます。 GCログの生成とヒープダンプの生成を有効にし、GCアルゴリズムをG1に切り替えるには、アプリケーションサーバーに次のJVMオプションを追加します:
where
|