<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="261259" data-post-id="261259">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="tompesman" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/tompesman/120/21700_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  tompesman
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>We upgraded to <code>2.13.3</code>, but unfortunately we’re still experiencing this issue. It looks like it is related to the <code>Oban.insert_all</code>, because we’re only experiencing it with the jobs inserted like that. And maybe only when that queue is empty, because the jobs after that first <code>insert_all</code> runs with a concurrency of <code>1</code>.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="261259" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/oban-setup-for-separate-worker-web-nodes/50215/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-261259" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="261259"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="261270" data-post-id="261270">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sorentwo" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sorentwo/120/37360_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sorentwo
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Oban Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>If you can make a minimal reproduction of your setup that exhibits the problem then I’ll investigate and work on a fix.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="261270" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/oban-setup-for-separate-worker-web-nodes/50215/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-261270" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="261270"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="261328" data-post-id="261328">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="tompesman" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/tompesman/120/21700_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  tompesman
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’m trying to get a reproduction. The non default we have in our applications is that there are two databases and the <code>prepare: :unnamed</code> setting enabled in Ecto. At the moment I do not have a test case where I can reproduce it consistently, but I’ve seen the behaviour a few times.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="261328" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/oban-setup-for-separate-worker-web-nodes/50215/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-261328" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="261328"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #13"></div>
  </section>
</div>
    <div class="postbit" id="261389" data-post-id="261389">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="tompesman" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/tompesman/120/21700_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  tompesman
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I think it is not related to the multiple database setup of Ecto. I just saw it again with only the <code>prepare: :unnamed</code> setting enabled and a single database.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">521	completed	ocr	Demo.Job	{"id": 1}	{}	1	1	2022-09-14 11:26:10.88802	2022-09-14 11:26:10.88802	2022-09-14 11:26:10.89765	2022-09-14 11:26:11.907732	{9to5-MacBook-Pro}		3	{}	{}	
522	completed	ocr	Demo.Job	{"id": 2}	{}	1	1	2022-09-14 11:26:10.88802	2022-09-14 11:26:10.88802	2022-09-14 11:26:10.89765	2022-09-14 11:26:11.907957	{9to5-MacBook-Pro}		3	{}	{}	
523	completed	ocr	Demo.Job	{"id": 3}	{}	1	1	2022-09-14 11:26:10.88802	2022-09-14 11:26:10.88802	2022-09-14 11:26:10.89765	2022-09-14 11:26:11.909088	{9to5-MacBook-Pro}		3	{}	{}	
524	completed	ocr	Demo.Job	{"id": 4}	{}	1	1	2022-09-14 11:26:10.88802	2022-09-14 11:26:10.88802	2022-09-14 11:26:10.89765	2022-09-14 11:26:11.90967	{9to5-MacBook-Pro}		3	{}	{}	
525	completed	ocr	Demo.Job	{"id": 5}	{}	1	1	2022-09-14 11:26:10.88802	2022-09-14 11:26:10.88802	2022-09-14 11:26:10.89765	2022-09-14 11:26:11.910167	{9to5-MacBook-Pro}		3	{}	{}	
526	completed	ocr	Demo.Job	{"id": 6}	{}	1	1	2022-09-14 11:26:10.88802	2022-09-14 11:26:10.88802	2022-09-14 11:26:10.89765	2022-09-14 11:26:11.915585	{9to5-MacBook-Pro}		3	{}	{}	
527	completed	ocr	Demo.Job	{"id": 7}	{}	1	1	2022-09-14 11:26:10.88802	2022-09-14 11:26:10.88802	2022-09-14 11:26:10.89765	2022-09-14 11:26:11.915452	{9to5-MacBook-Pro}		3	{}	{}	
528	completed	ocr	Demo.Job	{"id": 8}	{}	1	1	2022-09-14 11:26:10.88802	2022-09-14 11:26:10.88802	2022-09-14 11:26:10.89765	2022-09-14 11:26:11.915305	{9to5-MacBook-Pro}		3	{}	{}	
529	completed	ocr	Demo.Job	{"id": 9}	{}	1	1	2022-09-14 11:26:10.88802	2022-09-14 11:26:10.88802	2022-09-14 11:26:10.89765	2022-09-14 11:26:11.915722	{9to5-MacBook-Pro}		3	{}	{}	
530	completed	ocr	Demo.Job	{"id": 10}	{}	1	1	2022-09-14 11:26:10.88802	2022-09-14 11:26:10.88802	2022-09-14 11:26:10.89765	2022-09-14 11:26:11.915795	{9to5-MacBook-Pro}		3	{}	{}	
531	completed	ocr	Demo.Job	{"id": 1}	{}	1	1	2022-09-14 11:26:36.447177	2022-09-14 11:26:36.447177	2022-09-14 11:26:36.455261	2022-09-14 11:26:37.471022	{9to5-MacBook-Pro}		3	{}	{}	
532	completed	ocr	Demo.Job	{"id": 2}	{}	1	1	2022-09-14 11:26:36.447177	2022-09-14 11:26:36.447177	2022-09-14 11:26:36.455261	2022-09-14 11:26:37.470968	{9to5-MacBook-Pro}		3	{}	{}	
533	completed	ocr	Demo.Job	{"id": 3}	{}	1	1	2022-09-14 11:26:36.447177	2022-09-14 11:26:36.447177	2022-09-14 11:26:36.455261	2022-09-14 11:26:37.470802	{9to5-MacBook-Pro}		3	{}	{}	
534	completed	ocr	Demo.Job	{"id": 4}	{}	1	1	2022-09-14 11:26:36.447177	2022-09-14 11:26:36.447177	2022-09-14 11:26:36.455261	2022-09-14 11:26:37.472534	{9to5-MacBook-Pro}		3	{}	{}	
535	completed	ocr	Demo.Job	{"id": 5}	{}	1	1	2022-09-14 11:26:36.447177	2022-09-14 11:26:36.447177	2022-09-14 11:26:36.455261	2022-09-14 11:26:37.4725	{9to5-MacBook-Pro}		3	{}	{}	
536	completed	ocr	Demo.Job	{"id": 6}	{}	1	1	2022-09-14 11:26:36.447177	2022-09-14 11:26:36.447177	2022-09-14 11:26:36.455261	2022-09-14 11:26:37.472228	{9to5-MacBook-Pro}		3	{}	{}	
537	completed	ocr	Demo.Job	{"id": 7}	{}	1	1	2022-09-14 11:26:36.447177	2022-09-14 11:26:36.447177	2022-09-14 11:26:36.455261	2022-09-14 11:26:37.472295	{9to5-MacBook-Pro}		3	{}	{}	
538	completed	ocr	Demo.Job	{"id": 8}	{}	1	1	2022-09-14 11:26:36.447177	2022-09-14 11:26:36.447177	2022-09-14 11:26:36.455261	2022-09-14 11:26:37.472545	{9to5-MacBook-Pro}		3	{}	{}	
539	completed	ocr	Demo.Job	{"id": 9}	{}	1	1	2022-09-14 11:26:36.447177	2022-09-14 11:26:36.447177	2022-09-14 11:26:36.455261	2022-09-14 11:26:37.472601	{9to5-MacBook-Pro}		3	{}	{}	
540	completed	ocr	Demo.Job	{"id": 10}	{}	1	1	2022-09-14 11:26:36.447177	2022-09-14 11:26:36.447177	2022-09-14 11:26:36.455261	2022-09-14 11:26:37.473616	{9to5-MacBook-Pro}		3	{}	{}	
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="261389" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/oban-setup-for-separate-worker-web-nodes/50215/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-261389" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="261389"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #14"></div>
  </section>
</div>
    <div class="postbit" id="261397" data-post-id="261397">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sorentwo" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sorentwo/120/37360_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sorentwo
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Oban Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>It’s common to use <code>prepare: :unnamed</code>, I don’t believe that is an issue.</p>
<p>The output you’ve shared doesn’t include any headers, so I can’t tell which timestamp is which. Here is a short script I wrote to verify queues processes jobs sequentially:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">Application.put_env(:oban, Oban.Test.Repo,
  name: Oban.Test.Repo,
  url: "postgres://localhost:5432/oban_test",
  prepare: :unnamed
)

defmodule SomeWorker do
  use Oban.Worker

  @impl Worker
  def perform(%{args: %{"id" =&gt; id}}) do
    IO.puts "JOB #{id} started at #{System.system_time(:millisecond)}"

    Process.sleep(100)

    :ok
  end
end

{:ok, _} = Oban.Test.Repo.start_link()
{:ok, _} = Oban.start_link(queues: [default: 1], repo: Oban.Test.Repo)

1..9
|&gt; Enum.map(&amp;SomeWorker.new(%{id: &amp;1}))
|&gt; Oban.insert_all()
</code></pre>
<p>That generates this output, showing that jobs are started sequentially:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">JOB 1 started at 1663158893513
JOB 2 started at 1663158893630
JOB 3 started at 1663158893747
JOB 4 started at 1663158893861
JOB 5 started at 1663158893986
JOB 6 started at 1663158894108
JOB 7 started at 1663158894229
JOB 8 started at 1663158894344
JOB 9 started at 1663158894458
</code></pre>
<p>The <code>oban_jobs</code> table shows that the <code>attempted_at</code> and <code>completed_at</code> times are staggered as expected (note it is only showing the time and not the date):</p>
<pre data-code-wrap="elixir"><code class="lang-elixir"> id  │    args    │   state   │  inserted_at    │  attempted_at   │  completed_at
═════╪════════════╪═══════════╪═════════════════╪═════════════════╪═════════════════
 671 │ {"id": 1}  │ completed │ 12:34:53.486301 │ 12:34:53.505758 │ 12:34:53.613663
 672 │ {"id": 2}  │ completed │ 12:34:53.486301 │ 12:34:53.623178 │ 12:34:53.730719
 673 │ {"id": 3}  │ completed │ 12:34:53.486301 │ 12:34:53.740571 │ 12:34:53.84865
 674 │ {"id": 4}  │ completed │ 12:34:53.486301 │ 12:34:53.857146 │ 12:34:53.961968
 675 │ {"id": 5}  │ completed │ 12:34:53.486301 │ 12:34:53.976616 │ 12:34:54.087918
 676 │ {"id": 6}  │ completed │ 12:34:53.486301 │ 12:34:54.102646 │ 12:34:54.20998
 677 │ {"id": 7}  │ completed │ 12:34:53.486301 │ 12:34:54.224589 │ 12:34:54.329783
 678 │ {"id": 8}  │ completed │ 12:34:53.486301 │ 12:34:54.339628 │ 12:34:54.445821
 679 │ {"id": 9}  │ completed │ 12:34:53.486301 │ 12:34:54.455605 │ 12:34:54.559764
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="261397" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/oban-setup-for-separate-worker-web-nodes/50215/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-261397" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="261397"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #15"></div>
  </section>
</div>
    <div class="postbit" id="262289" data-post-id="262289">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="tompesman" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/tompesman/120/21700_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  tompesman
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Getting the issue reproduced is hard, but I’m still trying to figure out in which direction the issue is. I’ve changed the <code>insert_all</code> to a <code>Enum.each</code> with an <code>Oban.insert</code>. The issue is still there. I’ve attached a screenshot of the database. The <code>attempted_at</code> timestamp is the same for the executing jobs.</p>
<p></p><div class="lightbox-wrapper"><a class="lightbox" href="https://forum.elixirforum.com/uploads/default/original/3X/c/d/cd6f2f2c4ba4c3c1ab589d32d0d4c971442f0e1b.png" data-download-href="https://forum.elixirforum.com/uploads/default/cd6f2f2c4ba4c3c1ab589d32d0d4c971442f0e1b" title="Screenshot 2022-09-22 at 10.57.24" rel="nofollow"><img src="https://forum.elixirforum.com/uploads/default/original/3X/c/d/cd6f2f2c4ba4c3c1ab589d32d0d4c971442f0e1b.png" alt="Screenshot 2022-09-22 at 10.57.24" data-base62-sha1="tjm5K6YNLYZOwarKIOKE7FM99aP" width="690" height="385" data-dominant-color="323232"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screenshot 2022-09-22 at 10.57.24</span><span class="informations">1024×572 93.9 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><p></p>
<p>To verify the config of the worker node I connected remotely to the node and ran: <code>Oban.config()</code></p>
<pre data-code-wrap="elixir"><code class="lang-elixir">%Oban.Config{
  dispatch_cooldown: 5,
  engine: Oban.Engines.Basic,
  get_dynamic_repo: nil,
  log: false,
  name: Oban,
  node: "node-name-here@10.0.4.30",
  notifier: Oban.Notifiers.Postgres,
  peer: Oban.Peers.Postgres,
  plugins: [
    {Oban.Plugins.Cron,
     [
       timezone: "Europe/Amsterdam",
       crontab: [
         ...
       ]
     ]},
    Oban.Plugins.Pruner,
    Oban.Plugins.Stager
  ],
  prefix: "public",
  queues: [default: [limit: 2], images: [limit: 1], ocr: [limit: 1]],
  repo: Project.Repo,
  shutdown_grace_period: 15000,
  testing: :disabled
}
</code></pre>
<p>When I look how the jobs are updated into an <code>executing</code> state: <a href="https://github.com/sorentwo/oban/blob/44803121eb16be6a4dffb147aa257555c421050c/lib/oban/engines/basic.ex#L105" class="inline-onebox" rel="noopener nofollow ugc">oban/lib/oban/engines/basic.ex at 44803121eb16be6a4dffb147aa257555c421050c · oban-bg/oban · GitHub</a><br>
It looks like the demand is too high, but that can only happen if the limit is higher than 1 because <a href="https://hexdocs.pm/elixir/Kernel.html#map_size/1" rel="noopener nofollow ugc">map_size</a> returns a <code>non_neg_integer</code>. Is it possible that I set the limit incorrectly?</p>
<p>Thanks!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="262289" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/oban-setup-for-separate-worker-web-nodes/50215/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-262289" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="262289"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #16"></div>
  </section>
</div>
    <div class="postbit" id="262311" data-post-id="262311">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sorentwo" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sorentwo/120/37360_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sorentwo
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Oban Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="tompesman" data-post="17" data-topic="50215">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/tompesman/48/21700_2.png" class="avatar"> tompesman:</div>
<blockquote>
<p>Is it possible that I set the limit incorrectly?</p>
</blockquote>
</aside>
<p>Doubtful, the <code>limit</code> is validated before starting or updating the value on a running queue. Unless you’re using <code>:sys.replace_state/2</code> to meddle with the queue’s producer, there’s no way to get an invalid limit. To verify the configuration, you can get the queue’s current state with <code>Oban.check_queue/1</code>.</p>
<p>Does it always run the same number of jobs simultaneously? From your screenshot, it looks like there are 24 with the same timestamp.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="262311" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/oban-setup-for-separate-worker-web-nodes/50215/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-262311" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="262311"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #17"></div>
  </section>
</div>
    <div class="postbit" id="262315" data-post-id="262315">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="tompesman" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/tompesman/120/21700_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  tompesman
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I just caught it running multiple jobs on the <code>ocr</code> queue.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">iex(node@10.0.3.26)2&gt; Oban.check_queue(queue: :ocr)    
%{
  limit: 1,
  name: Oban,
  node: "node@10.0.3.26",
  paused: false,
  queue: "ocr",
  refresh_interval: 30000,
  running: [20660303, 20660276, 20660255, 20660257, 20660292, 20660280,
   20660293],
  started_at: ~U[2022-09-22 10:32:26.603968Z],
  updated_at: ~U[2022-09-22 14:08:18.654687Z]
}
</code></pre>
<p>Right now I have 7 jobs with the same timestamp executing. But I do not see a pattern with the amount happening. It looks like if the queue is empty and new jobs are queued this happens. If new jobs are inserted after the queue is working on jobs the new jobs are executed one by one.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="262315" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/oban-setup-for-separate-worker-web-nodes/50215/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-262315" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="262315"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #18"></div>
  </section>
</div>
    <div class="postbit" id="263013" data-post-id="263013">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="tompesman" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/tompesman/120/21700_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  tompesman
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Is there something else I can investigate? I have this situation multiple times per day on our production environment. So I can deploy some extra debug logs for example.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="263013" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/oban-setup-for-separate-worker-web-nodes/50215/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-263013" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="263013"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #19"></div>
  </section>
</div>
    <div class="postbit" id="263072" data-post-id="263072">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sorentwo" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sorentwo/120/37360_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sorentwo
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Oban Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>You could hook into the queue producer’s telemetry events and emit logs:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule ProducerLogger do
  require Logger

  def handle(_event, _measure, %{queue: queue, dispatched_count: count}, _opts) do
    Logger.debug("[ProducerLogger] queue #{queue} dispatched #{count} jobs")
  end
end

:telemetry.attach("queue-logger", [:oban, :producer, :stop], &amp;ProducerLogger.handle/4, [])
</code></pre>
<p>The count should always be <code>1</code> based on your config. If not, something is awry.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="263072" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/oban-setup-for-separate-worker-web-nodes/50215/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-263072" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="263072"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>