Strange delay when using dnf or yum

I have a strange “issue” thant popped up today. I recently migrated my server from centos 7 to rocky linux 8 (full reinstall not an upgrade script). I had no problem during the initial setup yesterday, but recently (since this morning) I have a strange delay of about 10-15 sec before dnf starts doing anything, I mean, update, install, add-repo, anything as the same delay before it starts, but when its starts, everything goes fine.

I have no idea where to start from there to troubleshoot so I was wondering if anyone had an idea on where to start. I did some google and forum search, but couldn’t find anything (might have the wrong keywords)

If I’m duplicating something please tell me.

Dnf seems to check/update metadata cache as first step.

$ dnf list
Last metadata expiration check: 0:00:05 ago on Fri 29 Oct 2021 06:04:44 PM EEST.
Installed Packages
...

What if you clear metadata?

$ sudo dnf clean all

Then there should be no local cache files to read (if issue was in that). Next is obviously network (particularly DNS).

clearing the metadata didn’t change a thing. I’m gonna look in my dns server if it is rate limiting my homelab

So it was my DNS server, I was running a pihole on a raspberry pi zero and the sd card is failling causing massive delays in general on my network.

2 Likes