Periodic scripts that hit external servers can cause a "thundering herd" problem, whereby many systems' periodic scripts run at the same time, and overload the server. To prevent this, such scripts should sleep for a random amount of time before hitting the external server. After r316432, there is a common anticongestion function to handle this. For an example of how to use it, see https://bugs.freebsd.org/bugzilla/attachment.cgi?id=181374&action=diff
Committed, thanks!
A commit references this bug: Author: matthew Date: Fri Apr 7 07:11:41 UTC 2017 New revision: 437913 URL: https://svnweb.freebsd.org/changeset/ports/437913 Log: New version: 0.03 Add a random delay using the standard 'anticongestion' function (where available) before attempting to download updates. This to avoid the 'thundering herd' of many simultaneous downloads. PR: 218444 Reported by: asomers Changes: head/mail/sa-utils/Makefile head/mail/sa-utils/files/sa-utils.in
I guess I should've been a little clearer, matthew. In the example diff I showed, the SLEEP variable, the random function, and the -nodelay option were all particular to that particular port, and were defined elsewhere in the periodic script. r437913 is not going to work because SLEEP and random are undefined. Here is a simpler example: https://bugs.freebsd.org/bugzilla/attachment.cgi?id=181556&action=diff