You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Score set page 504s for score sets with about 500k variants #451
The score set page can't load a score set with over ~200k variants, for example urn:mavedb:00000053-a-1 (score set id 183). GET /score-sets/{urn}/variants builds the whole lean variant list, serializes it with Pydantic and sends it as one JSON body. The load balancer times out before the first byte, returns 504, and the worker process stays busy until the response is finished.
Indexing is necessary but not enough. With the variant-number sort indexed (#899) and a (mapping_record_id, allele_id) WHERE valid_to IS NULL index on mapping_record_alleles for get_protein_hgvs_by_record, the endpoint still 504s for score sets in our database. The remaining cost grows per row: join fan-out, serialization and transfer before anything is sent.
Scope
Stream GET /score-sets/{urn}/variants as NDJSON in batches, following _stream_score_set_variant_details in routers/score_sets.py. get_lean_score_set_variants (lib/score_set_variants.py) yields batches instead of a list.
changed the title [-]Attempting to load very large score sets can crash the API[/-][+]Score set page 504s for score sets with about 500k variants[/+]on Sep 24, 2026
Activity
[-]Attempting to load very large score sets can crash the API[/-][+]Score set page 504s for score sets with about 500k variants[/+]