<p dir="auto">The option <code class="notranslate">app.conf.worker_pool</code> is not honored. As I've been requested in previous issues to follow the template, I will try to.</p>
<h1 dir="auto">Checklist</h1>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first:  I didn't ask. This is a super easily reproducible bug, and I <code class="notranslate">git bisect</code> to identify the commit responsible.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br>
<a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br>
on reporting bugs.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br>
for similar or identical bug reports.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br>
for existing proposed fixes.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br>
to find out if the bug was already fixed in the master branch.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br>
in this issue (If there are none, check this box anyway).</li>
</ul>
<h2 dir="auto">Mandatory Debugging Information</h2>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br>
(if you are not able to do this, then at least specify the Celery<br>
version affected).</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all the versions of all the external dependencies required<br>
to reproduce this bug.</li>
</ul>
<h4 dir="auto">Related Issues</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h4 dir="auto">Possible Duplicates</h4>
<ul dir="auto">
<li>None</li>
</ul>
<h2 dir="auto">Environment &amp; Settings</h2>

<p dir="auto">5.0.5 (singularity)</p>

<details>
<summary><b><code class="notranslate">celery report</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -&gt; celery:5.0.5 (singularity) kombu:5.0.2 py:3.8.2
            billiard:3.6.3.0 py-amqp:5.0.5
platform -&gt; system:Linux arch:64bit, ELF
            kernel version:4.19.121-linuxkit imp:CPython
loader   -&gt; celery.loaders.app.AppLoader
settings -&gt; transport:amqp results:disabled

deprecated_settings: None
worker_concurrency: 1
worker_pool: 'solo'"><pre class="notranslate"><code class="notranslate">software -&gt; celery:5.0.5 (singularity) kombu:5.0.2 py:3.8.2
            billiard:3.6.3.0 py-amqp:5.0.5
platform -&gt; system:Linux arch:64bit, ELF
            kernel version:4.19.121-linuxkit imp:CPython
loader   -&gt; celery.loaders.app.AppLoader
settings -&gt; transport:amqp results:disabled

deprecated_settings: None
worker_concurrency: 1
worker_pool: 'solo'
</code></pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Steps to Reproduce</h1>
<h2 dir="auto">Required Dependencies</h2>

<ul dir="auto">
<li><strong>Minimal Python Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Celery Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Kombu Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Broker Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Version</strong>: N/A or Unknown</li>
<li><strong>Minimal OS and/or Kernel Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Broker Client Version</strong>: N/A or Unknown</li>
<li><strong>Minimal Result Backend Client Version</strong>: N/A or Unknown</li>
</ul>
<h3 dir="auto">Python Packages</h3>

<details>
<summary><b><code class="notranslate">pip freeze</code> Output:</b></summary>
<p dir="auto">
</p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="amqp             5.0.5
billiard         3.6.3.0
celery           5.0.5   /tmp/celery
click            7.1.2
click-didyoumean 0.0.3
click-plugins    1.1.1
click-repl       0.1.6
kombu            5.0.2
pip              21.0.1
prompt-toolkit   3.0.18
pytz             2021.1
setuptools       54.1.2
six              1.15.0
vine             5.0.0
wcwidth          0.2.5
wheel            0.36.2"><pre class="notranslate"><code class="notranslate">amqp             5.0.5
billiard         3.6.3.0
celery           5.0.5   /tmp/celery
click            7.1.2
click-didyoumean 0.0.3
click-plugins    1.1.1
click-repl       0.1.6
kombu            5.0.2
pip              21.0.1
prompt-toolkit   3.0.18
pytz             2021.1
setuptools       54.1.2
six              1.15.0
vine             5.0.0
wcwidth          0.2.5
wheel            0.36.2
</code></pre></div>
<p dir="auto"></p>
</details>
<h3 dir="auto">Other Dependencies</h3>

<details>
<p dir="auto">
N/A
</p>
</details>
<h2 dir="auto">Minimally Reproducible Test Case</h2>

<details>
<p dir="auto">
</p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from celery import Celery


app = Celery(
    'worker',
)

app.conf.update(
    worker_concurrency=1,
    worker_pool='solo',
)"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">celery</span> <span class="pl-k">import</span> <span class="pl-v">Celery</span>


<span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">Celery</span>(
    <span class="pl-s">'worker'</span>,
)

<span class="pl-s1">app</span>.<span class="pl-s1">conf</span>.<span class="pl-en">update</span>(
    <span class="pl-s1">worker_concurrency</span><span class="pl-c1">=</span><span class="pl-c1">1</span>,
    <span class="pl-s1">worker_pool</span><span class="pl-c1">=</span><span class="pl-s">'solo'</span>,
)</pre></div>
<p dir="auto"></p>
</details>
<h1 dir="auto">Expected Behavior</h1>

<p dir="auto">The banner displayed by <code class="notranslate">celery -A worker worker</code> should contain <code class="notranslate">concurrency: 1 (solo)</code></p>
<h1 dir="auto">Actual Behavior</h1>

<p dir="auto">The banner contains <code class="notranslate">concurrency: 1 (prefork)</code>. The parameter <code class="notranslate">worker_concurrency</code> is honored, but <code class="notranslate">worker_pool</code> is ignored.</p>
<p dir="auto">The problem apparently comes from <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/celery/celery/commit/01651d2f5d9ad20dfb9812d92831510147974b23/hovercard" href="https://github.com/celery/celery/commit/01651d2f5d9ad20dfb9812d92831510147974b23"><tt>01651d2</tt></a></p>
<h2 dir="auto">Checklist</h2>
<p dir="auto">I'm <code class="notranslate">pip</code> installing Celery from <code class="notranslate">master</code>.</p>
<h2 dir="auto">Steps to reproduce</h2>
<p dir="auto">Submit a task to an SQS broker and verify that there are 1 messages available and 0 messages "in flight" (total messages: 1). Launch a worker connected to that broker and now verify that there are 0 messages available and 1 messages "in flight" (total messages: 1). Shutdown the worker before the task completes (via Ctrl + C). The task will then be resubmitted with the following message:</p>
<p dir="auto"><code class="notranslate">Restoring 1 unacknowledged message(s).</code></p>
<p dir="auto">Verify that the total number of messages in SQS is now 2 (1 available and 1 "in flight").</p>
<p dir="auto">Repeat.</p>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">I expect the total number of messages in the SQS broker to remain constant, as is the behavior I observe when I perform the repro with a Redis broker.</p>
<h2 dir="auto">Actual behavior</h2>
<p dir="auto">Messages are duplicated, which can cause the queue to grow in an unbounded way.</p>
<p dir="auto">Adding to this, I have long-running tasks (~45 min) and notice that I quite frequently see this error message</p>
<p dir="auto"><code class="notranslate">[INFO] botocore.vendored.requests.packages.urllib3.connectionpool: Resetting dropped connection: sqs.us-west-2.amazonaws.com</code></p>
<p dir="auto">in conjunction with <code class="notranslate">Restoring N unacknowledged messages.</code></p>
<p dir="auto">It seems that dying SQS connections are causing workers to restart, which is in turn causing my queue to grow. (FYI: overnight, it grew from ~10 jobs to 13,000 because of this behavior when running a cluster of ~20 machines)</p>