mod_tile appears to require a single-process (but can handle multiple threads) Apache server to work correctly
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 32/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- apache, cpp
- Ambito
- backend, networking
Direzione di ricerca
Inizia da mod_tile/includes/protocol.h e dalla configurazione dei processi/thread di Apache descritta nel report. Riproduci il comportamento con più processi Apache utilizzando il socket renderd configurato, quindi traccia quale processo legge ciascuna risposta; l'indagine è completa quando la causa del routing delle risposte è confermata o esclusa e viene identificata la modifica necessaria alla configurazione o al codice.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- C++
- Stelle
- 318
- Fork
- 199
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di openstreetmap/mod_tile
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
openstreetmap/mod_tile#292 · 4 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
openstreetmap/mod_tile#499 · 4 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
openstreetmap/mod_tile#478 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
openstreetmap/mod_tile#477 · 7 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 32/100
openstreetmap/mod_tile#472 · 1 commento ·
Tutte le issue di openstreetmap/mod_tile
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
mpfaffenberger/privateer_reimagined#658 ·
I maintainer di solito rispondono entro 1 giorno
-
Broken links in the docsAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
microsoft/onnxruntime#33018 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
AXERA-TECH/ax-llm#81 ·
-
enhancement
Difficoltà 2/5 Mezza giornata Idoneità per principianti 78/100
ros-industrial/ros2_canopen#448 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno