ミライハック
  • Home
  • Categories
  • About

>> Home / LInux

Apache2.4とAJPのエラーと対処

∵ Takayoshi Saito ∴ 2013-07-25 ∞ 2'

Apacheでスコアボードがフルになるエラー

Apache2.4で動かしているAPIサーバーで以下のエラーログが出力されていた。

Resource temporarily unavailable: apr_thread_create: unable to create worker thread

リソースが足りないと言われているので、MaxRequestWorkersやMaxConnectionsPerChildを見直したんだけど、今度は↓のようなエラーが出力されるようになった。

   AH00485: scoreboard is full, not at MaxRequestWorkers
   AH00485: scoreboard is full, not at MaxRequestWorkers
   AH00485: scoreboard is full, not at MaxRequestWorkers
   AH00485: scoreboard is full, not at MaxRequestWorkers
   AH00485: scoreboard is full, not at MaxRequestWorkers
   AH00485: scoreboard is full, not at MaxRequestWorkers
   AH00485: scoreboard is full, not at MaxRequestWorkers
   AH00485: scoreboard is full, not at MaxRequestWorkers
   AH00485: scoreboard is full, not at MaxRequestWorkers
   AH00485: scoreboard is full, not at MaxRequestWorkers

原因はKeepaliveでした。KeepAlive Onになっていて、MaxKeepAliveRequests 100だったので、MaxConnectionsPerChildのコネクションを維持できずにエラーになっていた模様です。KeepaliveをいったんOffにしたところエラーは出なくなりました。あとでMaxKeepAliveRequestsを最適化させておこう。

AJPコネクタでエラー

先ほどのエラーは出なくなったのですが、バッチが動く朝4時に下記のエラーが出力されていました。

   (104)Connection reset by peer: AH01030: ajp_ilink_receive() can't receive header
   (104)Connection reset by peer: AH01030: ajp_ilink_receive() can't receive header
   (104)Connection reset by peer: AH01030: ajp_ilink_receive() can't receive header
   (104)Connection reset by peer: AH01030: ajp_ilink_receive() can't receive header
   (104)Connection reset by peer: AH01030: ajp_ilink_receive() can't receive header
   (104)Connection reset by peer: AH01030: ajp_ilink_receive() can't receive header
   (104)Connection reset by peer: AH01030: ajp_ilink_receive() can't receive header
   (104)Connection reset by peer: AH01030: ajp_ilink_receive() can't receive header

AJPコネクタでTomcatに接続している処理が切れてしまうみたい。

    
     ProxyPass ajp://localhost:8009/
    

このProxyPassをProxyPass ajp://localhost:8009/ keepalive=onにすると接続は維持されるみたい。明日試してみよう。

サーバ構築の実際がわかる Apache[実践]運用/管理 (Software Design plus)posted with カエレバ鶴長 鎮一 技術評論社 2012-03-23

Search

Categories
  • LInux
  • インターネット
  • インフラ
  • エッセイ
  • ゲーム
  • システム開発
  • セキュリティ
  • データサイエンス
  • 国際関係
  • 政治
  • 歴史
  • 社会学
  • 自己紹介
  • 行ってきた

Pages
  • 齊藤貴義
  • 職務経歴
  • スクレイピング・ハッキング・ラボ サポートページ
  • 『爆速開発を支えるClaude Code上級者テクニック』サポートページ

2026 © Takayoshi Saito | Twitter GitHub | Built on Zola