Site edit page fails to load with a very large number of ASNs assigned #71

Closed
opened 2026-04-05 16:21:28 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @jeremystretch on 3/26/2026

NetBox Edition

NetBox Community

NetBox Version

v4.5.5

Python Version

3.12

Steps to Reproduce

  1. Create a RIR
  2. Create a site named "Site 1"
  3. Create 10,000 ASNs and assign them to this site:
rir = ipam.RIR.objects.first()
site = dcim.Site.objects.get(name='Site 1')
asns = [
    ipam.ASN(asn=i, rir=rir) for i in range(1, 10001)
]
ipam.ASN.objects.bulk_create(asns, batch_size=250)
site.asns.set(
    ipam.ASN.objects.all()
)
  1. Attempt to edit the site in the NetBox UI

Expected Behavior

The site edit form should render normally.

Observed Behavior

The response times out (or takes exceedingly long). I believe this is due to the overhead required to render the sites multiple-choice form field with so many values pre-populated.

*Originally created by @jeremystretch on 3/26/2026* ### NetBox Edition NetBox Community ### NetBox Version v4.5.5 ### Python Version 3.12 ### Steps to Reproduce 1. Create a RIR 2. Create a site named "Site 1" 3. Create 10,000 ASNs and assign them to this site: ```python rir = ipam.RIR.objects.first() site = dcim.Site.objects.get(name='Site 1') asns = [ ipam.ASN(asn=i, rir=rir) for i in range(1, 10001) ] ipam.ASN.objects.bulk_create(asns, batch_size=250) site.asns.set( ipam.ASN.objects.all() ) ``` 4. Attempt to edit the site in the NetBox UI ### Expected Behavior The site edit form should render normally. ### Observed Behavior The response times out (or takes exceedingly long). I believe this is due to the overhead required to render the `sites` multiple-choice form field with so many values pre-populated.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#71