I cannot remember details for your setup, but if polling is the problem, possible techniques to directly reduce polling include
- try and change everything to disable polling/fetches/autoUpdates and use notification webhooks from the repo manager instead so GoCD only checks for changes when a change is made on the repo: https://api.gocd.org/current/#webhook This even works with most custom material plugins (if you use the Git path material plugin, for example) but can require a lot of configuration depending on your Gitlab setup.
- if still getting throttled just due to sheer numbers of parallel clones inside agents/jobs - set up a HTTPS proxy cache for you git repo manager and send notifications here; only `git fetch` when notified, and point GoCD at this proxy/cache instead.
If the errors are
not from throttling on Gitlab, it's possible they are just due to speed of processing the # of materials; and you should dig into what exactly is slow. In the logs, this is usually seen in the
MaterialUpdateListener thread logging or
[Material Update] - things like
Skipping update of material with an error message. You can turn on additional debug logging for logging category
com.thoughtworks.go.server.perf in
logback-include.xml to get a better idea of what might be happening - but only worth doing if there are no other obvious errors/exceptions/logs that explain why it's so slow. Even without this special configuration, in such cases you will
usually see more obvious logs for problems.
If the issues are not to do with the upstream repository manager (you don't see errors in UI or logs from Git that imply getting throttled) I'd be interested to help you see what is actually slow here. If you can share a redacted snapshot from /go/api/support that might help.
-Chad