mod_tile appears to require a single-process (but can handle multiple threads) Apache server to work correctly
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 32/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- apache, cpp
- Área
- backend, networking
Línea de trabajo
Comienza con mod_tile/includes/protocol.h y la configuración de procesos/hilos de Apache descrita en el informe. Reproduce el comportamiento con varios procesos de Apache utilizando el socket de renderd configurado y, a continuación, rastrea qué proceso lee cada respuesta; la investigación estará completa cuando se confirme o se descarte la causa del enrutamiento de respuestas y se identifique el cambio necesario de configuración o de código.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C++
- Estrellas
- 318
- Forks
- 200
- Merge medio
- 2 d 22 h
- PR fusionados (30 d)
- 22
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de openstreetmap/mod_tile
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
openstreetmap/mod_tile#292 · 4 comentarios ·
Los mantenedores suelen responder en 2 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
openstreetmap/mod_tile#477 · 7 comentarios ·
Los mantenedores suelen responder en 2 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
openstreetmap/mod_tile#466 · 2 comentarios ·
Los mantenedores suelen responder en 2 días
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
openstreetmap/mod_tile#462 · 7 comentarios ·
Los mantenedores suelen responder en 2 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
openstreetmap/mod_tile#447 · 3 comentarios · 1 reacción ·
Los mantenedores suelen responder en 2 días
Todos los issues de openstreetmap/mod_tile
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
prestonbrown/helixscreen#1922 ·
Los mantenedores suelen responder en 1 día
-
component: workspaces
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
zen-browser/desktop#16218 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Abort (SIGABRT) when stderr is a closed pipe: uncaught fmt::system_error in ccache_main's catchAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
[Estuary] Music videos "Random artists" playlist always displays the alphabetically first 10 artistsAbiertoTriage: Needed
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
Los mantenedores suelen responder en 2 días