legacy-knowledge-base
公開されました Sep. 10, 2025

アプリケーション サーバーの停止に時間がかかりすぎる

written-by

Sergio Alonso

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • アプリケーション サーバーのシャットダウンは無期限に待機するため、kill コマンドを使用する必要があります。

Environment

  • Liferay DXP 7.0+

解決策

  • どのような状況でも、OSGi サービスを停止するためのラッチ カウントダウンに多くの時間がかかることがあります。 したがって、スタックした OSGi サービスにより、アプリケーション サーバーの停止が妨げられます。
  • ただし、 Felix Declarative Services 実装 (DXP で使用される OSGi フレームワーク) には、構成を介して、フレームワークのシャットダウン中にサービスのゲインおよび/または停止ブロックを解決するためのタイムアウト手順があります。
  • タイムアウトの構成は、次のフレームワーク プロパティによって実現されます。
    org.apache.felix.scr.impl.config.ScrConfiguration.DEFAULT_LOCK_TIMEOUT_MILLISECONDS = 5000;

    org.apache.felix.scr.impl.config.ScrConfiguration.DEFAULT_STOP_TIMEOUT_MILLISECONDS = 60000;
  • それにもかかわらず、これらのプロパティは、次のデフォルト値を持つ portal.properties ファイルの DXP で再定義されます。
    #
    # Pass arbitrary extra properties to the framework using the prefix:
    # "module.framework.properties." to avoid avoid colliding with other
    # frameworks that may be running within the same JVM.
    #
    ...
    module.framework.properties.ds.lock.timeout.milliseconds=1800000
    module.framework.properties.ds.stop.timeout.milliseconds=1800000
    ...
  • そのため、アプリケーション サーバーのシャットダウン プロセスは、OSGi フレームワークがタイムアウトが発生したと見なす前に、OSGi フレームワークの待機の影響を受けます。 1800000 ミリ秒 = 30 分。
  • 推奨される解決策として、 portal-ext.propeties ファイルで両方のプロパティをシステムに適した値で定義すると、不要な待機を回避できます。

追加情報

  • 両方のプロパティは LPS-69090に含まれていました。
did-this-article-resolve-your-issue

legacy-knowledge-base