-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Displaying the page of a prefix with many child prefixes (each having a child range) runs into gateway timeout #14500
Comments
This is a duplicate of #13880 which was closed due missing information. Missing information is now hopefully provided. |
The delay stems from the call to |
Hello, This is related to how adding and removing items in the sets works. It's seem its way faster to make a list of network items then transform it as a ipset rather than adding them one by one. I think this is because it make internal loops everytime you add items in it. The page loads with the given script in ~6s on my computer. |
Assigning to you @Smixi as I'm working on other bugfixes right now. |
Note: Maybe we can also add cached property into prefix as it is made inside IPRange ? It will solve the second point mentionned here :
Or create another issue ? |
Nice. Thanks for fixing! |
Deployment Type
Self-hosted
NetBox Version
v3.6.6
Python Version
3.11
Steps to Reproduce
The page
/ipam/prefixes/1/
on our Netbox instance takes more than 20mins to display and runs into a timeout when not increasing timeout values.My test system is a Debian 12 VM (VMware VM) with netbox 3.6.6. The system has two CPU cores and 4 GB Memory. Initial state is an empty database.
I can trigger the 504 Gateway Time-out (nginx error) when I create a prefix with 1000 child prefixes where each child prefix has one child range.
This is how I create the objects in nbshell:
If you apply this to a new installation, this URL triggers the timeout:
Or click the result of this search:
There is a related #13471 where it appears that we can't do much about it but hope that this going to be addressed in Netbox itself.
Expected Behavior
The page should be rendered within reasonable time.
Observed Behavior
We get a 504 when trying to visit the particular page.
The text was updated successfully, but these errors were encountered: