mod_tile appears to require a single-process (but can handle multiple threads) Apache server to work correctly
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 32/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- apache, cpp
- 領域
- backend, networking
調査の方向性
mod_tile/includes/protocol.h と、レポートに記載されている Apache のプロセス/スレッド設定から始めます。設定済みの renderd ソケットを使用する複数の Apache プロセスで動作を再現し、その後、各レスポンスをどのプロセスが読み取るかを追跡します。レスポンスのルーティング原因が確認または除外され、必要な設定変更またはコード変更が特定された時点で調査は完了です。
索引モデルが issue の本文から書いたものです。
説明
I was struggling for some days with the problem that under heavy load, mod_tile seemed to not return a tile promptly to waiting http client connection. The tile was in fact rendered, but the http connection appeared to be stuck waiting for acknowledgement from render, I think.
I read the code a bit and came across this comment in mod_tile/includes/protocol.h:
A client may not bother waiting for a response if the render daemon is too slow
causing responses to get slightly out of step with requests.
This gave me cause to investigate the possibility that in a multiprocessing apache, multiple independent http server processes have reached renderd and are writing commands to render tiles and read for response. My hypothesis is that there is a single socket shared by all connected renderd clients, and in that case, if the server that did not submit the request to render a tile reads the response, then it simply throws it away as it can't notify another process's thread, and the Apache process whose thread did submit that request gets stuck waiting for it until something timeouts.
I have no conclusively proven that this is indeed what is happening, but I got rid of my slowly rendered tiles by enabling mod_event and setting it up in such a way that it starts only 1 process, and ThreadLimit, MaxRequests, etc. were all set to 150 so that apache will not fork more than 1 worker process. I presume that as long as there is only 1 apache process, when it serves multiple threads, it is able to discover which thread is waiting for the tile rendering acknowledgement.
It is also worth noting that my mod_tile configuration is as follows:
ModTileTileDir /var/cache/renderd/tiles
LoadTileConfigFile /etc/renderd.conf
ModTileEnableStats On
ModTileRequestTImeout 60
ModTileMissingRequestTimeout 60
ModTileRenderdSocketName /run/renderd/renderd.sock
i.e. I have set a long RequestTimeout and MissingRequestTimeout. My clients are willing to wait for as long as it takes for the tile to come, instead of a shorter duration. It may be that the shorter 3 and 10 second timeout values somewhat mask the problem. I think that request does return with the tile's data if the tile gets rendered by renderd before the timeout, it just takes unnecessarily long time to get the tile. In my case, the timeout was excessively long and thus I was motivated to try to figure out why it kept happening.
- 主要言語
- C++
- スター
- 318
- フォーク
- 200
- 平均マージ
- 2日 22時間
- マージ済み PR(30日)
- 22
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
openstreetmap/mod_tile のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
openstreetmap/mod_tile#292 · コメント 4 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
openstreetmap/mod_tile#477 · コメント 7 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
openstreetmap/mod_tile#466 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
openstreetmap/mod_tile#462 · コメント 7 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
openstreetmap/mod_tile#447 · コメント 3 件 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
openstreetmap/mod_tile の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
scp-fs2open/fs2open.github.com#7953 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
SteveMacenski/slam_toolbox#907 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
HansKristian-Work/dxil-spirv#341 ·
メンテナーはふだん 1 日以内に返信