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

SamlSpMessagesとSamlSpAuthRequestsテーブルの大量の期限切れレコードをクリーンアップする必要があります。

written-by

Laura Li

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

問題

  • データベースサーバーで1時間ごとに高いCPU使用率が観測され、 SamlSpMessagesとSamlSpAuthRequestsテーブルに大量のデータが存在します。

環境

  • DXP 7.1

解決

  • 根本的な原因は、以下の2つのリスナーが何らかの原因でしばらく動作せず、大量の期限切れレコードがクリーンアップされていないことだと思われます。 リスナーが再びアクティブになったとき、これらのテーブルをクリーンアップするために大規模なリソースを必要とします。

    com.liferay.saml.runtime.internal.messaging.SamlSpMessageMessageListener

    DBの createDate とLiferayの SpAuthRequestMaxAge の設定を比較して、expiredSamlSpAuthRequetsを削除しています。


    com.liferay.saml.runtime.internal.messaging.SamlSpAuthRequestMessageListener

    有効期限を確認してExpiredSamlSpMessagesを削除しています。

  • SamlSpMessagesとSamlSpAuthRequestsテーブルの期限切れレコードをクリーンアップするには、以下のAPIの使用を検討してください。

    com.liferay.saml.persistence.service.SamlSpMessageLocalServiceUtil.deleteExpiredSamlSpMessages();

    com.liferay.saml.persistence.service.SamlSpAuthRequestLocalServiceUtil.deleteExpiredSamlSpAuthRequests();
did-this-article-resolve-your-issue

legacy-knowledge-base