I’ve increased the RAM size of the VM from 32 to 128 GB and now the full sync was able to finishef. During the sync, I have noticed memory usage of up to 80 GB.
I have also noticed that it seems to be related to syncing the elastic repositories for 7.x, 8.x, 9.x. (https://artifacts.elastic.co/packages/7.x/yum) At least, I have identified those repository_ids in the task and after it finished there were a lot of messages like this in /var/log/messages:
Feb 12 18:26:20 foreman8-content pulpcore-worker-2[53485]: pulp [fba33e89-b21c-45bb-9a93-3233c7d6ba29]: pulpcore.plugin.stages.artifact_stages:WARNING: No declared artifact with relative path 'metricbeat-8.4.2-1.aarch64.rpm' for content '(UUID('018d10fb-8027-7374-9c16-e28faff37f8a'), 'metricbeat', '0', '8.4.2', '1', 'aarch64', 'sha1', '2af1508ea363330c3f2203b6236abc03c876b642')' from remote '1-alma10-Testing-f2ba9ce4-60c1-474f-9b9c-b65d519da357'. Using last from available-paths : 'metricbeat-8.4.2-aarch64.rpm'