
Op maandag 27 juni 2022 12:32:03 CEST schreef David T-G:
Freek, et al --
...and then Freek de Kruijf said... % % It works as expected, but this only happens occasionally, normally the % command works OK. Yesterday it occurred 4 times out of 24 and today it % already occurred 4 times out of 16.
That's very odd indeed. It doesn't sound like it's related to runnimg under cron but instead something transient in the system. I was going to suggeat that you strace dig, but i don't think that;s worth it.
% % It may be important to mention: this is with Leap 15.4 on a Raspberry Pi 4B.
I would lean next toward a resource limitation, and although a Pi is awesome :-) perhaps it's struggling. What does top tell you? What's the uptime? Carlos usually has great ideas here :-) You might try adding some debug info into the script to give you a picture of the world each time cron kicks it off. What if you run the command manually oh, say, 1000 times with no waiting?
:-D
Tried it 1000 times, without waiting and a sleep 1. Both reported one issue, respectively on count 450 and 179. top i shows: top - 16:44:13 up 13 days, 2:02, 1 user, load average: 0.01, 0.05, 0.02 Tasks: 180 total, 1 running, 179 sleeping, 0 stopped, 0 zombie %Cpu(s): 0.2 us, 0.2 sy, 0.0 ni, 99.6 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st MiB Mem : 7836.246 total, 1192.496 free, 1704.031 used, 4939.719 buff/cache MiB Swap: 8195.996 total, 8194.246 free, 1.750 used. 6051.578 avail Mem -- fr.gr. member openSUSE Freek de Kruijf