<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[GitLab 19.6.1: Sidekiq saturated with `-c 2` (new `Authz::ProjectAuthorizations::RefreshWorker` polling slot)]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Since the package update to GitLab 19.6.1 (image <code>cloudron/com.gitlab.cloudronapp:202611201720200000</code>, previously 19.5.3), background jobs on our instance are delayed by 1–3 minutes: pipelines start late, issues referenced by <code>Closes #N</code> are closed minutes after the merge, webhooks are late. The Sidekiq queue <code>default</code> constantly has 130–150 jobs waiting.</p>
<p dir="auto"><strong>Cause</strong></p>
<p dir="auto">The package starts Sidekiq with a hard-coded concurrency of 2 (<code>/etc/supervisor/conf.d/sidekiq.conf</code><img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f61e.png?v=7b44d6dff6c" class="not-responsive emoji emoji-android emoji--disappointed" style="height:1.4em;width:auto;vertical-align:middle" title="):" alt="😞" /></p>
<pre><code>command=bundle exec sidekiq -c 2 -C /home/git/gitlab/config/sidekiq_queues.yml -e production
</code></pre>
<p dir="auto">GitLab 19.6 adds the cron <code>authz_project_authorizations_refresh_worker</code> (<code>config/schedule.yml</code>, every minute). It queues 4 slots of <code>Authz::ProjectAuthorizations::RefreshWorker</code>; slot 1 is a <em>polling slot</em> that waits on an empty queue until its 4-minute runtime limit, then is rescheduled immediately (<code>deduplicate :until_executed, if_deduplicated: :reschedule_once</code>). The worker's own comment says: "an idle queue holds one thread".</p>
<p dir="auto">With only 2 threads, this is half of Sidekiq's capacity permanently, on an idle instance. In our <code>sidekiq.log</code> over 4 hours (03:17–07:27 UTC), this worker used 29,773 s of the ~30,000 s available on the 2 threads (821 runs, slot 1 running ~180 s each time). Average scheduling latency for all other jobs: 73 s, max 181 s.</p>
<p dir="auto">No feature flag disables the polling slot: the <code>authz_refresh_*</code> flags only change how refresh events are processed, and <code>do_not_run_safety_net_auth_refresh_jobs</code> only affects <code>ReverifyProjectAuthorizationsCronWorker</code>.</p>
<p dir="auto"><strong>Request</strong></p>
<p dir="auto">Could the package raise the default Sidekiq concurrency (GitLab's own default is 20), or make it configurable (for example an environment variable or a file in <code>/app/data</code> read by <code>start.sh</code>)? The root filesystem is read-only, so we can't change it ourselves.</p>
<p dir="auto">Environment: Cloudron, GitLab CE 19.6.1, app memory limit 15 GiB (6.6 GiB used)</p>
<p dir="auto">Thanks!</p>
]]></description><link>https://forum.cloudron.io/topic/16328/gitlab-19.6.1-sidekiq-saturated-with-c-2-new-authz-projectauthorizations-refreshworker-polling-slot</link><generator>RSS for Node</generator><lastBuildDate>Tue, 24 Nov 2026 04:48:53 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/16328.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 23 Nov 2026 07:36:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to GitLab 19.6.1: Sidekiq saturated with `-c 2` (new `Authz::ProjectAuthorizations::RefreshWorker` polling slot) on Mon, 23 Nov 2026 10:18:16 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/arnaudguy" aria-label="Profile: arnaudguy">@<bdi>arnaudguy</bdi></a></p>
<p dir="auto">Thanks for the detailed report.<br />
I can confirm your findings against the GitLab v19.6.1 source</p>
<ul>
<li>new cron <code>authz_project_authorizations_refresh_worker</code> runs every minute: <a href="https://gitlab.com/gitlab-org/gitlab-foss/-/blob/v19.6.1/config/schedule.yml#L48-50" target="_blank" rel="noopener noreferrer nofollow ugc">https://gitlab.com/gitlab-org/gitlab-foss/-/blob/v19.6.1/config/schedule.yml#L48-50</a></li>
<li>polling slot holds one Sidekiq thread on an idle instance by design: <a href="https://gitlab.com/gitlab-org/gitlab-foss/-/blob/v19.6.1/app/workers/authz/project_authorizations/refresh_worker.rb#L5-7" target="_blank" rel="noopener noreferrer nofollow ugc">https://gitlab.com/gitlab-org/gitlab-foss/-/blob/v19.6.1/app/workers/authz/project_authorizations/refresh_worker.rb#L5-7</a></li>
<li>loop runs about 180 s per job and no feature flag stops it: <a href="https://gitlab.com/gitlab-org/gitlab-foss/-/blob/v19.6.1/app/services/authz/project_authorizations/refresh_service.rb#L37-60" target="_blank" rel="noopener noreferrer nofollow ugc">https://gitlab.com/gitlab-org/gitlab-foss/-/blob/v19.6.1/app/services/authz/project_authorizations/refresh_service.rb#L37-60</a></li>
</ul>
<p dir="auto">With the package's hard-coded <code>sidekiq -c 2</code>, that leaves one thread for everything else.</p>
<p dir="auto">With the default feature flags your <code>cron_jobs</code> override is fine as a temporary workaround. The events are dropped while <code>authz_refresh_sidekiq_*</code> is enabled: <a href="https://gitlab.com/gitlab-org/gitlab-foss/-/blob/v19.6.1/app/services/authz/project_authorizations/refresh_service.rb#L133-137" target="_blank" rel="noopener noreferrer nofollow ugc">https://gitlab.com/gitlab-org/gitlab-foss/-/blob/v19.6.1/app/services/authz/project_authorizations/refresh_service.rb#L133-137</a></p>
<p dir="auto">The fix could be a higher Sidekiq concurrency that scales with the app memory limit.<br />
I will test this and report my findings here.</p>
]]></description><link>https://forum.cloudron.io/post/133294</link><guid isPermaLink="true">https://forum.cloudron.io/post/133294</guid><dc:creator><![CDATA[james]]></dc:creator><pubDate>Mon, 23 Nov 2026 10:18:16 GMT</pubDate></item><item><title><![CDATA[Reply to GitLab 19.6.1: Sidekiq saturated with `-c 2` (new `Authz::ProjectAuthorizations::RefreshWorker` polling slot) on Mon, 23 Nov 2026 09:37:28 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/arnaudguy" aria-label="Profile: arnaudguy">@<bdi>arnaudguy</bdi></a><br />
Thanks for reporting, I will have to look into it.</p>
]]></description><link>https://forum.cloudron.io/post/133292</link><guid isPermaLink="true">https://forum.cloudron.io/post/133292</guid><dc:creator><![CDATA[james]]></dc:creator><pubDate>Mon, 23 Nov 2026 09:37:28 GMT</pubDate></item><item><title><![CDATA[Reply to GitLab 19.6.1: Sidekiq saturated with `-c 2` (new `Authz::ProjectAuthorizations::RefreshWorker` polling slot) on Mon, 23 Nov 2026 07:47:47 GMT]]></title><description><![CDATA[<p dir="auto">Update: workaround applied while waiting for a package fix.</p>
<p dir="auto"><code>/app/data/gitlab.yml</code> is persistent and <code>start.sh</code> only rewrites specific keys, so I slowed down the new cron there instead of touching the read-only image:</p>
<pre><code>production:
  cron_jobs:
    authz_project_authorizations_refresh_worker:
      cron: '*/15 * * * *'
</code></pre>
<p dir="auto">then <code>supervisorctl restart sidekiq</code> inside the app container (no web downtime).</p>
<p dir="auto">With the default 19.6 feature flags (<code>authz_refresh_compute_*</code> and <code>authz_refresh_write_path</code> disabled, <code>authz_refresh_sidekiq_*</code> enabled), this worker only drops refresh events and authorizations are still refreshed by the existing Sidekiq workers, so running it every 15 minutes instead of every minute should be harmless. The polling slot now holds one of the two threads for about 4 minutes out of 15 instead of permanently.</p>
<p dir="auto">This is only a workaround: a higher or configurable Sidekiq concurrency in the package would still be the real fix.</p>
]]></description><link>https://forum.cloudron.io/post/133289</link><guid isPermaLink="true">https://forum.cloudron.io/post/133289</guid><dc:creator><![CDATA[arnaudguy]]></dc:creator><pubDate>Mon, 23 Nov 2026 07:47:47 GMT</pubDate></item></channel></rss>