NLnetLabs / krill

RPKI Certificate Authority and Publication Server written in Rust
https://nlnetlabs.nl/projects/routing/krill/
Mozilla Public License 2.0
294 stars 41 forks source link

Login ajax request taking forever / timeout #1177

Open straussmarkus opened 9 months ago

straussmarkus commented 9 months ago

Hi,

after upgrading to 0.14.4 on Debian 12, i have a weird issue, where logging in (config auth) takes forever (load indicator at top of page spinning)

In dev tools i can see that it waits for an ajax request to: https://myurl.com/api/v1/cas/MY-CA/routes/analysis/full

Which never retourns and then eventually my reverse proxy times out for this request.

Is there anything i can do about that?

timbru commented 9 months ago

Is this still blocking?

It looks like it might have been stuck waiting for the BGP Ris files to be downloaded. @ximon18 I think the write lock in this code should be moved until after the download happens: https://github.com/NLnetLabs/krill/blob/46feb1e64a29e5bfe7b3db91fb0227602011522e/src/commons/bgp/analyser.rs#L47

straussmarkus commented 9 months ago

I still have that problem. Restarting the krill instance may solve it sometimes. But on next login it happens again

timbru commented 9 months ago

Do you have a large amount of ROAs configured, or do you have many announcements for the space on your certificate? I am wondering why you see this issue and others do not.

If it's the downloading BGP RIS dumps that is causing this, then you could try disabling the BGP preview functionality in your config file by setting bgp_risdumps_enabled = false. You would no longer have ROA suggestions. I.e. you only see your actual configurations and no information about announcements.

If this improves things for you then we are one step closer to knowing the cause.

straussmarkus commented 9 months ago

I have 4 parent CAs and 3 ROAs, so not much.I set  bgp_risdumps_enabled = false and it seems to work at the moment, but i will see tomorrow as it always took some time before the problem occured.

timbru commented 9 months ago

Please let us know if the issue re-occurs.

The behaviour you saw is consistent with the locking issue I mentioned earlier. I will leave a PR with a fix for this, but releasing this will have to wait until after the holiday season at least.

straussmarkus commented 9 months ago

It did not re-occur till now :)

ximon18 commented 9 months ago

Thanks @straussmarkus.

I'll leave this open until the PR created by @timbru has been reviewed and incorporated into a new release of Krill.