Github webhook push events delays in SCM API plugin

137 views
Skip to first unread message

DuMaM

unread,
Dec 14, 2023, 1:59:01 PM12/14/23
to Jenkins Developers
Hi,

I would like to discuss some idea.
I recently came across some delays connected with GitHub webhooks processing.
Furthermore, I found out that there is a property in the SCM API plugin which can drive SCM event queue behavior.
https://github.com/jenkinsci/scm-api-plugin/blob/bab9621cdacf4276ed5f0c93e41f794290bfc67b/src/main/java/jenkins/scm/api/SCMEvent.java#L111C5-L111C5

Is there any chance of making this property not the final one, to enable edits on run time?

According to the code, we can kill this service and a new service singleton should be spawned, and this way we can fine tune this behavior.

Thanks,
Bartosz Nowak

Tim Jacomb

unread,
Dec 14, 2023, 3:51:06 PM12/14/23
to jenkin...@googlegroups.com
The thread pool is initialised when the first event is received.
There's not much point making it editable at runtime I think.

If you are hitting delays run "jenkins.scm.api.SCMEvent.executorService"
In the script console and see if you have any queued.

We run with 40 threads using that system property.

If you are using GitHub org folders keep in mind it's not really designed for multiple folders pointing to the same GitHub org, it doesn't scale very well in its current setup.

Depending on the issue I may be able to advise more as I debugged a similar issue last year and I made a few changes to github-branch-source and scm-api to help.

Cheers
Tim

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/1ca1086d-e9c7-4987-8e7f-227a58fe834an%40googlegroups.com.

DuMaM

unread,
Dec 19, 2023, 10:01:36 AM12/19/23
to Jenkins Developers
Hi,

Thanks for this replay.
i found your blog post about it, and we also tweaked a bit this property, what helped greatly.
Sadly i still see some issues connected to "
I was asking about it mostly because if there is a possibility to tweak this in run time, we can make this to adjust in a dynamic way to the current Jenkins load.

Tim Jacomb

unread,
Dec 19, 2023, 11:27:04 AM12/19/23
to jenkin...@googlegroups.com
You aren’t getting rate limited by GitHub are you?

We use the open telemetry plugin to show a dashboard with the remaining rate limit of all the credentials. 

If you give a bit more info  about your setup or thread dumps it may be possible to see where the delays are coming from

Reply all
Reply to author
Forward
0 new messages