The issue comes from a chain of two Nexus proxy repositories. When a package or metadata file (like repomd.xml or a large .rpm) is not yet cached, the local Nexus waits while the central Nexus downloads the entire file from the upstream AlmaLinux repo before responding. This delay often causes curl error 28 or 502 errors, especially with large files or fresh metadata.
As a temporary workaround, I run a dummy download or yum makecache before provisioning, to warm up the cache and avoid timeouts.
Hope this helps anyone facing similar issues.