Migrate to Actix 0.13 APIs, Tokio 1.x, and fix OGN device DB download #439
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(Please do not merge yet, this needs an update to Cargo.toml again after actix-ogn is released.)
I observed ogn-web-gateway on FVA's servers to spend >95% of its CPU time under load in Tokio, Actix, and the kernel [1]. CPU usage then remained at 7 full cores in the late evening, and restarting the service made it return to normal.
This PR replaces the 4+y old dependencies with recent ones just to rule out subtle bugs with recent Linux versions.
The issue may have started after FVA migrated to LXC for containerizing Linux (previously VMware ESXi), which updated the OGN VM's Linux kernel from 4.19 to 5.15 without changing userspace. It may also have been there forever already. We cannot really roll the whole thing back to check again on a busy day.
This depends on Turbo87/actix-ogn#32 being merged and released. Currently Cargo.toml points to
../actix-ogn
for the on-master version.Change summary:
Tests done:
cargo test
passesecho 'bbox|-1.163826432568077|49.131099997360025|14.656486067431924|52.2073178286237' | websocat -n1 ws:https://localhost:9999/api/live
still returns dataI did not update:
[1]
![Screenshot 2023-05-07 at 00 11 27](https://user-images.githubusercontent.com/597682/236833392-7d546a66-2c27-4079-b72d-8e2773172e60.png)
perf report
when ogn-web-gateway was under load: