Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

mod_tile appears to require a single-process (but can handle multiple threads) Apache server to work correctly

Abierto
#238 3 comentarios 0 reacciones 0 asignados Ver en GitHub

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

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

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de openstreetmap/mod_tile

Todos los issues de openstreetmap/mod_tile

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.