Skip to content

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

@jeremystretch

Description

@jeremystretch

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.

Metadata

Metadata

Assignees

Labels

netboxseverity: mediumResults in substantial degraded or broken functionality for specfic workflowsstatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions