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

Tomcat JDBC接続の枯渇

written-by

Liferay Support

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

この記事は、 VerifyProcessを実行する際のMySQLのトラブルシューティングを支援します。 小さい 最大JDBC接続プール は、 VerifyProcess が同時に実行されると、JDBC接続の枯渇を引き起こす。ユーザーが最大 Tomcat JDBC接続プール のサイズを、いくつかのVerifyProcess Suiteのモデル数より少なく設定または定義した場合、 VerifyProcess が同時に実行されるとTomcat JDBC接続プールが枯渇するかもしれません。

Liferay Portalの旧バージョンからLiferay Portal 6.2へのアップグレード時や、 verify.frequency= のプロパティに"-1 "が設定されている場合に発生することがあります。

以下は、モデルが定義されているVerify Process Suiteのものです:

  1. VerifyAuditedModel
  2. VerifyGroupId
  3. VerifyResourcePermissions(ベリファイリソースパーミッション
  4. ベリファイUUID

原因

com.liferay.portal.verify.VerifyProcessには、 doVerify() というメソッドがあり、以下のようなコードスニペットがあります:

protected void doVerify(
            Collection
                throwableAwareRunnables)
        throws Exception {

        if (throwableAwareRunnables.size() <
                PropsValues.VERIFY_PROCESS_CONCURRENCY_THRESHOLD) {

            for (ThrowableAwareRunnable throwableAwareRunnable :
                    throwableAwareRunnables) {

                throwableAwareRunnable.run();
            }
        }
        else {
            ExecutorService executorService = Executors.newFixedThreadPool(
                throwableAwareRunnables.size());

ベリファイ・スイートの必要なモデル数が閾値( verify.process.concurrency.threshold propertyで定義)を超えると、上記のスニペットの以下のコードに基づき、ベリファイ・プロセスは同時実行を試みます。

else {

            ExecutorService executorService = Executors.newFixedThreadPool(

                throwableAwareRunnables.size());

このプロセスは、検証スイートの検証を完了するために、その検証スイートのモデルに基づくJDBC接続スレッドの量を、並行性に対応するために取得しようとします。 通常、JDBC接続スレッドプールがデフォルト値か、比較的高い値(一般的なプロダクションレベル)であれば、問題はありません。 しかし、最大JDBC接続プールが小さい場合(例えば、最大JDBC接続スレッドが15個)、モデル量が最大JDBC接続プールの最大サイズを超えると、検証プロセスがハングアップしてポータルが応答しなくなることがあります。

解決策

この問題を解決するためには、2つの選択肢があります:
  1. Tomcat JDBC Connection Poolの最大値を、同時検証スレッドに対応するため、より適切な値に増やしてください。
  2. portal-ext.properties ファイルに、プロパティ verify.process.concurrency.threshold= を追加し、その値を VerifyProcess スイートのモデル数より大きく設定することで、検証処理をシングルスレッドで実行させます。
did-this-article-resolve-your-issue

legacy-knowledge-base