Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Bug: Redis connection pool exhaustion on /downloads/ endpoint under high concurrency

Aperta
#2,990 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Tranquilla
Stack tecnologico
python, redis

Direzione di ricerca

Inizia esaminando gunicorn.conf, apps/downloads/views.py e config/settings/cache.py, quindi analizza il comportamento della concorrenza utilizzando le metriche e i log delle connessioni Redis dell'applicazione. Verifica se l'endpoint dei download esaurisce il proprio pool e si blocca durante il lavoro su Redis o Celery. Il lavoro è considerato completato quando il traffico a raffica non causa più l'esaurimento, la latenza o gli errori di connessione segnalati e le statistiche memorizzate nella cache sono disponibili anche sotto pressione su Redis.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
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
  1. Access https://www.python.org/downloads/ during a high-traffic event (e.g., new Python release announcement)
  2. Monitor response times and Redis connection metrics via application monitoring
  3. 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.

Lingua principale
Python
Stelle
1.7k
Fork
700
Merge medio
1g 23h
PR unite (30g)
14

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di python/pythondotorg

Tutte le issue di python/pythondotorg

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.