[feature] Pause WHOIS lookups when the GeoLite quota is exhausted

Aperta
#1,550 2 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@nemesifier ci sta già lavorando.

Dal 5/11/2026.

  • #1551 di @nemesifier — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
67/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
django, python, redis

Direzione di ricerca

Find the GeoLite City WHOIS lookup code and its existing cache and Celery integration. Start by tracing how MaxMind errors, especially INSUFFICIENT_FUNDS (HTTP 402), are handled; check the relevant tests before changing behavior. Done means a shared six-hour cooldown skips service requests across organizations and workers, preserves existing WHOIS data, and allows lookups again after expiry.

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

Descrizione

Is your feature request related to a problem? Please describe.

OpenWISP uses MaxMind's GeoLite City web service to retrieve WHOIS information for device IP addresses. When the daily query quota is exhausted, subsequent lookups continue to request data from MaxMind even though those requests cannot succeed.

Describe the solution you'd like

When MaxMind reports that the GeoLite query quota is exhausted, store a cooldown marker in the cache for six hours. While the marker exists, skip further requests to the service. Once it expires, allow lookups to try again. If the quota is still exhausted, start another six-hour cooldown.

The cooldown should apply across organizations and Celery workers using the same MaxMind account. Existing WHOIS information should remain available during the cooldown.

Describe alternatives you've considered

MaxMind's documentation describes a daily query limit but does not specify an exact reset time. A fixed six-hour cooldown avoids assuming that the quota resets at midnight UTC.

Retrying skipped tasks after the cooldown could recover lookups without waiting for another device event. That approach needs further investigation because Celery warns about long-delayed tasks with Redis brokers.

Additional context

MaxMind documents a limit of 1,000 GeoLite web-service lookups per day per service. For GeoLite City, INSUFFICIENT_FUNDS (HTTP 402) indicates that the account has reached its daily query limit.

Lingua principale
Python
Stelle
794
Fork
339
Merge medio
10h 24m
PR unite (30g)
33

Preparare l'ambiente

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 openwisp/openwisp-controller

Tutte le issue di openwisp/openwisp-controller

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.