Configuring LDAP connection pooling
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
症状
JIRA is using too many or too few LDAP connections and you need to adjust the connection pool.
診断
You would normally use a third party monitoring tool to determine how your connection pool is being used over time.
You can inspect JIRA's current settings at: <BASE URL>/plugins/servlet/embedded-crowd/configure/connection-pool/
The timeout is not accurately reflected on this page. There are options there to configure it, but they don't work. Other settings are saved correctly.
原因
The only time we have seen a need to adjust this pool is when scripts are authenticating against JIRA and not using cookies.
回避策
You can use Java system properties found in the setenv.sh or setenv.bat file to configure the LDAP connection pool. From http://docs.oracle.com/javase/jndi/tutorial/ldap/connect/config.html:
Here is an example of a command line that sets the maximum pool size to 20, the preferred pool size to 10, and the idle timeout to 5 minutes for pooled connections.
-Dcom.sun.jndi.ldap.connect.pool.maxsize=20
-Dcom.sun.jndi.ldap.connect.pool.prefsize=10
-Dcom.sun.jndi.ldap.connect.pool.timeout=300000
Please see the above link for exhaustive documentation on this functionality.
Check out Setting properties and options on startup for more information on setting Java properties.
プール プロパティ
設定 | System Property | 説明 | 既定値 |
---|---|---|---|
初期プール サイズ | com.sun.jndi.ldap.connect.pool.initsize | プールに初めて接続した時に作成される LDAP コネクションの数。 | 1 |
推奨プール サイズ | com.sun.jndi.ldap.connect.pool.prefsize | 最適なプールのサイズ。コネクションの数がこの値より大きくなると、LDAP はアイドル中のコネクションを削除します。値が 0 (ゼロ) の場合、推奨サイズがないことを意味するため、アイドル中のコネクションの数は制限されません。 | 10 |
最大プール サイズ | com.sun.jndi.ldap.connect.pool.maxsize | コネクション (接続) の最大数。コネクションの数がこの値に達すると、LDAP は以降のコネクションを拒否します。結果として、アプリケーションによって作成された LDAP サーバーに対するリクエストはブロックされます。この値が 0 (ゼロ) の場合、コネクション数は制限されません。 | 0 |
プール タイムアウト | com.sun.jndi.ldap.connect.pool.timeout | プールから削除される前にコネクションがアイドル状態で滞留できる時間 (秒)。アプリケーションがプールされたコネクションの使用を終えると、コネクションはアイドル状態としてマークされ、再利用を待ちます。この値が 0 (ゼロ) の場合は、アイドル時間が無制限であることを意味し、コネクションはタイムアウトされません。 | 30000 |
プール プロトコル | com.sun.jndi.ldap.connect.pool.protocol | これらのプロトコルタイプのみが LDAP に接続できます。複数のプロトコルを許可する場合は、スペース区切りで値を入力します。有効な値は以下のとおりです。
| plain ssl |
プール認証 | com.sun.jndi.ldap.connect.pool.authentication | Only these authentication types are allowed to connect to LDAP. If you want to allow multiple authentication types, enter the values separated by a space. See RFC 2829 for details of LDAP authentication methods. Valid values are:
| simple |
メモ:
- コネクション プール設定はシステム全体で有効であり、設定されたすべての LDAP ディレクトリ サーバーに新しいコネクション プールを作成するのに使用されます。
- この設定を有効にするには、アプリケーション サーバーを再起動する必要があります。