LoginSignup
0
0

More than 1 year has passed since last update.

IIS-Tomcat連携でAJPポート無応答

Posted at

某Webアプリ製品の導入。
いつものばたばたで負荷・性能テストなんて全くなし。

プレ本稼働的位置付けでユーザ使い始めたところで、出ました無応答。

IIS10 - Isapi_Redirector1.2 - Tomcat8.5
※サーバ同居

ユーザ使っているのでサービス再起動とかでとりあえず復旧優先とか
するものだからなかなか原因がつかめない。

OutOfMemoryError?

No

Stop the world?

No
※無駄にHeap大きいといった背景はありましたが

そもそもTomcatの稼働状況は?

あ、http connectorに直接リクエストすると普通に動いてる!
IIS-Tomcat間で詰まっているのか

Tomcatのacceptor thread枯渇?

事象からググるに
【真夏の夜のミステリー】Tomcatを殺したのは誰だ?
に到達(以前別件でも参照しました。。。既視感)
が、Tomcat側にmaxThreads云々のログなし
特定できていない状態でのトライ&エラーとして
server.xmlにてAJP ConnectorにconnectionTimeoutを指定するも
あえなく再発

再発時にnetstat 見ると

8009で250個のESTABLISHなTCP接続。250って何? 上述のacceptor threadの
デフォルトの上限とも違うし・・・?

すると追加で出力設定をしたIsapi_Redirectorのログが

isap_redirect.log
[warn] ajp_get_endpoint::jk_ajp_common.c (3177): Unable to get the free endpoint for worker ajp13w from 250 slots
[error] HttpExtensionProc::jk_isapi_plugin.c (2337): Failed to obtain an endpoint to service request - your connection_pool_size is probably less than the threads in your web server!

なるほど250 Slots / connection_pool_size

Isapi_Redirectorのworkers.propertiesに関連設定記述なし=デフォルト?

 
 The Apache Tomcat Connectors - Reference Guide / workers.properties configuration

あったあった

connection_pool_size
(略) For IIS the default value is 250 (before version 1.2.20: 10), (略)
connection_pool_timeout
(略) The default value zero disables the closing (infinite timeout).(略)

以下、connection_pool_timeout設定に注意書きあり

You should keep this time interval in sync with the keepAliveTimeout attribute (if it is set explicitly) or connectionTimeout attribute of your AJP connector in Tomcat's server.xml. Note however, that the value for mod_jk is given in seconds, the one in server.xml has to use milliseconds.

設定

connection_pool_size拡張、connection_pool_timeoutを制限。
最終的には他の設定値も含めた最終形を探るも、問題は抑止できた模様。
sizeの問題よりもtimeoutしない設定の方の問題が大きそう。
250はりつきどころか、いくらもたまっていかない。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0