Make QueuedTracking more stable when running out of memory
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
Línea de trabajo
Comienza revisando el flujo de habilitación de la cola y el comando queuedtracking::test; después, sigue cómo se gestionan los bloqueos de Redis y las solicitudes de seguimiento de la cola cuando se agota la memoria. Evalúa las comprobaciones propuestas de la política de eviction de Redis y la notificación de errores. Se considera terminado cuando las condiciones de poca memoria no socavan silenciosamente la cola ni su bloqueo, y las comprobaciones o errores relevantes están cubiertos por pruebas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Currently, we assume that always enough memory is available. Usually processing the data from Redis into the database should be kinda fast and the queue should not take loads of space. However, if there's eg a problem with tracking then it might just collect requests into Redis and never remove them from there when it is eg not possible to acquire a lock see #22 and #24 . In such cases it might be possible to run out of memory over time.
We should think about ways to make the Queue better handle such problems.
- Maybe we can detect a no more memory available and print or log a clear error message.
- Also when enabling the queue and when testing the queue via "queuedtracking::test", we should check whether eg the
noevictionorallkeys-lrueviction policy is activated (these are OK). Other policies might result in problems when it comes to low memory and will most likely always release our lock.
Background:
If no more memory is available, and eg volatile-lru is set, it would always evict first our key for the lock as it is probably the only one with an expire set. The same for volatile-random etc.
From http://redis.io/topics/lru-cache:
volatile-lru: evict keys trying to remove the less recently used (LRU) keys first, but only among keys that have an expire set, in order to make space for the new data added.
allkeys-lru: evict keys trying to remove the less recently used (LRU) keys first, in order to make space for the new data added
I was also thinking about using two databases, one for the lock etc and one for the actual tracking requests but this doesn't solve much. We could have had a small database just for the lock which doesn't need much space, maybe 1MB. This way we would make sure to never evict a lock key etc but I think it is not really needed as it makes configuration more difficult etc.
Maybe there are other things we can do too?
- Lenguaje dominante
- PHP
- Estrellas
- 87
- Forks
- 42
- Merge medio
- 2 d 8 h
- PR fusionados (30 d)
- 4
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
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 matomo-org/plugin-QueuedTracking
-
Transaction related DB errors attempt to rollback outside of a transaction and cause a fatal errorPosiblemente ocupada @snake14 la tomó hace 5 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
matomo-org/plugin-QueuedTracking#331 · 2 comentarios ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
matomo-org/plugin-QueuedTracking#324 · 1 reacción ·
-
QueuedTracking intercepts bulk JSON requests it cannot process, silently dropping all eventsAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
matomo-org/plugin-QueuedTracking#320 · 1 comentario ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 50/100
-
enhancement
Dificultad 3/5 1-2 días Aptitud para principiantes 42/100
Todos los issues de matomo-org/plugin-QueuedTracking
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
neos/flow-development-collection#3639 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
The PHP version check in prepare.php still allows PHP 7.2 and 7.3Posiblemente ocupada @ekamran la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
WordPress/phpunit-test-runner#359 ·
Los mantenedores suelen responder en 2 días
-
ObjectMapper
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
symfony/symfony-docs#23390 ·
Los mantenedores suelen responder en 2 días
-
sync-en
Dificultad 1/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
sync-en
Dificultad 1/5 Menos de una hora Aptitud para principiantes 83/100
Los mantenedores suelen responder en 3 días