Skip to content
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

weldr api delayed response after first /compose call #2850

Open
jkozol opened this issue Jul 21, 2022 · 3 comments
Open

weldr api delayed response after first /compose call #2850

jkozol opened this issue Jul 21, 2022 · 3 comments

Comments

@jkozol
Copy link
Contributor

jkozol commented Jul 21, 2022

As part of releasing cockpit-composer to f35/36 it became apparent that the api calls following the first /compose call are delayed. After the POST /compose call there is a long delay and then next expected calls/response suddenly all submit (We receive multiple status responses at once).

@bcl
Copy link
Contributor

bcl commented Aug 29, 2022

Ah, is this the first request sent after rebooting the system? If that's the case it is probably downloading new dnf metadata. We've discussed ways to fix that in #2887 (basically do a depsolve on startup to preload the metadata cache).

@achilleas-k
Copy link
Member

achilleas-k commented Feb 23, 2023

The startup metadata preload added in #2941 has a little nasty side-effect: because it uses the same base solver to depsolve for all distros, they all share the same top-level cache, which dnf locks, so they're essentially running in order.

This isn't an issue when no depsolve is needed immediately after starting composer but, if it is, it will block waiting for the preload, which can take minutes.

We could create a separate solver for each distro in the registry, with its own cache as a subdirectory of the main cache dir. I'm not sure what the memory load of that would be, given how much we cache in memory for each solver instance. It might also be a bit wasteful depending on how much users do cross-distro builds.

Maybe we can instead only preload the host distro?

@bcl
Copy link
Contributor

bcl commented Mar 2, 2023

See #3317 for a possible solution to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants