Bug: Redis connection pool exhaustion on /downloads/ endpoint under high concurrency
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 38/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Tranquilo
- Stack tecnológico
- python, redis
- Área
- backend, performance
Línea de trabajo
Comienza revisando gunicorn.conf, apps/downloads/views.py y config/settings/cache.py; después, inspecciona el comportamiento de concurrencia utilizando las métricas y los logs de conexiones Redis de la aplicación. Verifica si el endpoint de descargas agota su pool y se bloquea con trabajo de Redis o Celery. Se considera terminado cuando el tráfico en ráfagas ya no provoca el agotamiento, la latencia ni los errores de conexión reportados, y las estadísticas en caché están disponibles bajo presión de Redis.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
Under high concurrency conditions, particularly during new Python release events, the /downloads/ endpoint may experience Redis connection pool exhaustion. The application is configured with gunicorn.conf setting workers = 2, which creates a bottleneck when combined with synchronous Redis operations in the downloads view.
This manifests as increased tail latency and potential redis.exceptions.ConnectionError entries in application logs during traffic spikes.
To Reproduce
- Access https://www.python.org/downloads/ during a high-traffic event (e.g., new Python release announcement)
- Monitor response times and Redis connection metrics via application monitoring
- Observe elevated error rates and latency under sustained concurrent requests
Expected behavior
- Connection pooling should gracefully handle burst traffic without exhaustion
- Stale-while-revalidate caching pattern should serve cached download statistics when Redis is under pressure
- Celery tasks triggered from download views should be truly asynchronous, not blocking Redis operations on the main request thread
URL to the issue
https://www.python.org/downloads/
Screenshots
N/A (requires production monitoring access: Datadog dashboards, Sentry error logs, or Redis connection pool metrics)
Browsers
Microsoft Edge
Operating System
Windows
Browser Version
N/A
Relevant log output
# Example of expected log entry during pool exhaustion (needs verification in production):
redis.exceptions.ConnectionError: Connection pool exhausted. Unable to acquire connection within timeout.
# Relevant files for investigation:
# - gunicorn.conf (workers = 2)
# - apps/downloads/views.py
# - config/settings/cache.py
Additional context
Recent PR #2764 added a sitetree cache purge command to the Makefile, indicating the team's awareness of caching best practices. Similar patterns should be applied to high-traffic endpoints like /downloads/. Django cache framework documentation recommends connection pooling for production deployments. The project's dependency modernization efforts (e.g., pygments bump in PR #2977) suggest the team is actively maintaining performance-critical components.
- Lenguaje dominante
- Python
- Estrellas
- 1.7k
- Forks
- 702
- Merge medio
- 2 d 4 h
- PR fusionados (30 d)
- 18
Preparar el entorno
- Incluye un Dockerfile o un 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 python/pythondotorg
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
python/pythondotorg#3149 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Bug: The code examples on the main page don't match their source codePosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
python/pythondotorg#3137 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
app/pages bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
python/pythondotorg#2677 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
backend easy
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
python/pythondotorg#2453 · 8 comentarios ·
Los mantenedores suelen responder en 1 día
-
Bug: Nominee list shows nominations of you, not nominations you made, and ignores the electionPosiblemente ocupada @jefftriplett la tomó hace 52 días. Abiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 74/100
python/pythondotorg#3094 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de python/pythondotorg
Issues similares
-
jobs restart --verify: hotlane restart timeout (10s) shorter than its shutdown (~30s) → false exit 1Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
EtanHey/brainlayer#1072 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
_apply_doc_content: a cancel during the shielded image gather still sends the content batchUpdateAbiertoenhancement
Dificultad 2/5 Menos de una hora Aptitud para principiantes 80/100
khuisman/mcp-gee-sweet#904 ·
Los mantenedores suelen responder en 1 día
-
Lychee link check failedAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 70/100
-
CORE-HIST-005/006 multi-turn history tests send three different messages with the same messageIdAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
a2aproject/a2a-tck#248 ·