rengine
rengine copied to clipboard
Improve vuln loading api
Issue Summary
I have 4,435 in my instance, when I try to load /scan/detail/vuln page an XHR is made to /api/listVulnerability/ to load the 50 firsts vulns. But either it takes 1min to load or it fails in a 504 Gateway Time-out error when it excess that time.

Also when requesting another page an API req will be made to /api/listVulnerability/...&start=1&length=50 (eg for page 2) but no loading message is displayed while waiting for the response that makes look like the app is not responding and the user spamming the button an so make the server crash with too many heave requests.
Idea of solution
length may be limited to 10 by default. And I guess the vuln fetching requires a bit of optimization on the backend.
Also add a loading disclaimer while XHR are running.
👋 Hi @noraj, Issues is only for reporting a bug/feature request. Please read documentation before raising an issue https://rengine.wiki For very limited support, questions, and discussions, please join reNgine Discord channel: https://discord.gg/azv6fzhNCE Please include all the requested and relevant information when opening a bug report. Improper reports will be closed without any response.
PS : running rengine 1.2.0
Could you try on v2 and open a new issue if problem persists. You could also set up a gunicorn server. To make it works with reNgine, edit the web/entrypoint.sh file like this
...
#python3 manage.py runserver 0.0.0.0:8000
gunicorn reNgine.wsgi:application -w 32 --bind 0.0.0.0:8000 --limit-request-line 0
...
Here with 32 workers (you need to set your worker according to your CPUs/Threads number) Then relaunch web container
docker-compose restart web