BulkUploadGuard's one-upload-per-user limit holds per process, not per user
I maintainer di solito rispondono entro 3 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 42/100
Direzione di ricerca
Start in api/bulk_upload_guard.py, reading the module docstring and the current per-user and global admission paths. Compare the shared-state options described in the issue and determine how the chosen approach should coordinate across mod_wsgi processes. Done means one user cannot exceed the intended limit globally while the configured global cap still behaves correctly.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
BulkUploadGuard (api/bulk_upload_guard.py) is meant to allow at most one running bulk upload per user, plus a global cap (BULK_UPLOAD_MAX_CONCURRENT, default 2). Its state is an in-memory set behind a threading.Lock, so it lives in one WSGI process. The module docstring says so ("a multi-worker deployment bounds concurrency per worker process").
What that means in production, which runs several mod_wsgi processes:
- One user can run one upload per process, not one in total. This was reproduced on production on 2026-08-11, when the main group had 4 processes: 8 concurrent uploads by the same user gave 4 × 201 and 4 × 429. The process count has been raised since (12 in the main group when read on 2026-09-21; it is host configuration, not in this repo).
- The global cap never binds for a single user. Each process admits up to
BULK_UPLOAD_MAX_CONCURRENTuploads, and every rejection in the measurement came from the per-user branch, so for one user the effective ceiling is the process count, whatever the setting says.
The guard exists because a bulk upload pins a worker and holds an open transaction for its whole duration (synchronous WSGI by design), so the real ceiling matters for how many workers one client can occupy.
Possible fixes, roughly from cheapest:
- a Postgres advisory lock per user (
pg_try_advisory_lock(hash(user))) plus a counter for the global cap, which is shared by all processes for free; - a row in a small table with a TTL;
- or accept per-process semantics and document the real ceiling (processes × 1 per user).
Related: #2362 (Bulk Upload).
- Lingua principale
- Python
- Stelle
- 65
- Fork
- 28
- Merge medio
- 4g 7h
- PR unite (30g)
- 25
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OpenEnergyPlatform/oeplatform
-
API bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OpenEnergyPlatform/oeplatform#2580 ·
I maintainer di solito rispondono entro 3 giorni
-
Redesign the database page to support dataset creationForse già presa @bmlancien l’ha presa 4 giorni fa. Apertadata-upload
OpenEnergyPlatform/oeplatform#2762 · 1 commento · 3 assegnatari ·
I maintainer di solito rispondono entro 3 giorni
-
Improve navigation links in Core Features and Integrated WorkflowsForse già presa @tomi-rli l’ha presa 19 giorni fa. ApertaHomepage
OpenEnergyPlatform/oeplatform#2746 · 1 assegnatario ·
I maintainer di solito rispondono entro 3 giorni
-
Enhance the new OEP homepageForse già presa @jh-RLI l’ha presa 19 giorni fa. ApertaHomepage
OpenEnergyPlatform/oeplatform#2745 · 2 assegnatari ·
I maintainer di solito rispondono entro 3 giorni
-
Display child nodes in the OEO Viewer Graph ViewForse già presa @jh-RLI l’ha presa 23 giorni fa. Apertaoeo viewer
OpenEnergyPlatform/oeplatform#2739 · 1 assegnatario ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di OpenEnergyPlatform/oeplatform
Issue simili
-
needs-triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
flashinfer-ai/flashinfer#9803 ·
I maintainer di solito rispondono entro 1 giorno
-
bug frontend good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
oscarbol09/thesisforge#61 ·
-
api bug performance
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
oscarbol09/audiobard#159 ·
-
area:web p2 product:business triage:active type:bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 89/100
cuadrao-ai/argus#2328 ·
I maintainer di solito rispondono entro 1 giorno
-
bug frontend good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
nikhilb2/simple_invoicing#907 ·