<h3 dir="auto">Describe the issue with documentation</h3>
<p dir="auto"><strong>Apache Version</strong>: 2.2.3</p>
<p dir="auto"><strong>OS</strong>:macOS Catalina Version 10.15.7</p>
<p dir="auto"><strong>Apache Airflow Provider versions</strong>:</p>
<p dir="auto"><strong>Deployment</strong>:</p>
<p dir="auto"><strong>Web browser</strong>: Google Chrome Version 98.0.4758.80 (Official Build) (x86_64)<br>
Also happened with Safari Version 13.1.3 (15609.4.1)</p>
<p dir="auto"><strong>What happened</strong>:</p>
<p dir="auto">The <a href="https://airflow.apache.org/docs/apache-airflow/stable/tutorial.html#pipeline-example" rel="nofollow">Pipeline example of the tutorial</a> (in the website) looked like the following:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/75472729/153197308-4a5e9cb8-2a56-49c2-8f06-32c97f861ca3.png"><img src="https://user-images.githubusercontent.com/75472729/153197308-4a5e9cb8-2a56-49c2-8f06-32c97f861ca3.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">I was wondering why there was so little information about the connection to  Postgres and why there were no <code class="notranslate">import</code> statements in the code.</p>
<h3 dir="auto">How to solve the problem</h3>
<p dir="auto">Then, I realized that in the GitHub repo the <a href="https://github.com/apache/airflow/blob/main/docs/apache-airflow/tutorial.rst">tutorial file</a> was way more extensive:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/75472729/153198129-542888c8-c142-4fd0-905d-19ac98822aac.png"><img src="https://user-images.githubusercontent.com/75472729/153198129-542888c8-c142-4fd0-905d-19ac98822aac.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">I marked in red the parts of the tutorial that can't be seen on the website. There are probably more missing details.</p>
<p dir="auto">Thanks in advance!</p>
<h3 dir="auto">Anything else</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Are you willing to submit PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Yes I am willing to submit a PR!</li>
</ul>
<h3 dir="auto">Code of Conduct</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li>
</ul>
<h3 dir="auto">Apache Airflow version</h3>
<p dir="auto">2.2.3 (latest released)</p>
<h3 dir="auto">What happened</h3>
<p dir="auto">With a docker setup <a href="https://github.com/apache/airflow/blob/958860fcd7c9ecdf60b7ebeef4397b348835c8db/docs/apache-airflow/start/docker-compose.yaml">as defined by this compose file</a>, the <code class="notranslate">airflow-worker</code> service <code class="notranslate">healthcheck.test</code> command causes a general increase in memory use overtime, even when idle.  This was observed with Airflow 2.1.4 and 2.2.3.</p>
<p dir="auto"></p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/apache/airflow/blob/958860fcd7c9ecdf60b7ebeef4397b348835c8db/docs/apache-airflow/start/docker-compose.yaml#L131-L137">airflow/docs/apache-airflow/start/docker-compose.yaml</a>
    </p>
    <p class="mb-0 color-fg-muted">
        Lines 131 to 137
      in
      <a data-pjax="true" class="commit-tease-sha" href="/apache/airflow/commit/958860fcd7c9ecdf60b7ebeef4397b348835c8db">958860f</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L131" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="131"></td>
          <td id="LC131" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-ent">healthcheck</span>: </td>
        </tr>

        <tr class="border-0">
          <td id="L132" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="132"></td>
          <td id="LC132" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">   <span class="pl-ent">test</span>: </td>
        </tr>

        <tr class="border-0">
          <td id="L133" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="133"></td>
          <td id="LC133" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">     - <span class="pl-s"><span class="pl-pds">"</span>CMD-SHELL<span class="pl-pds">"</span></span> </td>
        </tr>

        <tr class="border-0">
          <td id="L134" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="134"></td>
          <td id="LC134" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">     - <span class="pl-s"><span class="pl-pds">'</span>celery --app airflow.executors.celery_executor.app inspect ping -d "celery@$${HOSTNAME}"<span class="pl-pds">'</span></span> </td>
        </tr>

        <tr class="border-0">
          <td id="L135" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="135"></td>
          <td id="LC135" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">   <span class="pl-ent">interval</span>: <span class="pl-c1">10s</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L136" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="136"></td>
          <td id="LC136" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">   <span class="pl-ent">timeout</span>: <span class="pl-c1">10s</span> </td>
        </tr>

        <tr class="border-0">
          <td id="L137" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="137"></td>
          <td id="LC137" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line">   <span class="pl-ent">retries</span>: <span class="pl-c1">5</span> </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>
<p dir="auto">We observed this in our AWS ECS cluster which has a 0.5 CPU/1 GB Mem Worker setup.  We strangely had a task fail (at the 2nd dip in memory use of the picture below), which prompted further investigation.  The task had actually succeeded, but for some reason notified dependent tasks as failed.  Subsequent tasks were marked as upstream failure, but the webserver reported the task as success.  We noticed the metrics page looked like the image below.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5741321/150593627-3bf63cfc-e8b2-492d-b8e6-5cc2933a3150.png"><img src="https://user-images.githubusercontent.com/5741321/150593627-3bf63cfc-e8b2-492d-b8e6-5cc2933a3150.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">We raised the CPU &amp; Memory to 2 CPU / 4 GB Mem and restarted the service, which still produced a gradual increase in memory.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5741321/150593887-d02b454a-d51a-42ad-8479-3f7cce8291f5.png"><img src="https://user-images.githubusercontent.com/5741321/150593887-d02b454a-d51a-42ad-8479-3f7cce8291f5.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">What you expected to happen</h3>
<p dir="auto">It should not increase in memory when the system is idle, but rather spike during healthcheck and release memory back to the host.</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">We use a modified version of the compose file and instead favor docker stack, but the same setup should apply to the documented <a href="https://github.com/apache/airflow/blob/958860fcd7c9ecdf60b7ebeef4397b348835c8db/docs/apache-airflow/start/docker-compose.yaml">compose file</a>.  A slimmed down compose file is below.  It has 2 workers, one with a healthcheck and one without.</p>
<p dir="auto">A secondary script was written to scrape the docker statistics in 10 second intervals and write them to a CSV file.</p>
<p dir="auto">Executing both commands can be done like so:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ docker stack deploy -c docker-compose.yaml airflow
$ nohup ./collect_stats.sh &gt; stats.csv &amp;"><pre class="notranslate">$ docker stack deploy -c docker-compose.yaml airflow
$ nohup ./collect_stats.sh <span class="pl-k">&gt;</span> stats.csv <span class="pl-k">&amp;</span></pre></div>
<p dir="auto">The necessary files are below.  I'm also including a sample of the CSV file run locally.<br>
<a href="https://github.com/apache/airflow/files/7916422/worker_stats.csv">worker_stats.csv</a></p>
<p dir="auto">It shows that over a ~2 hour time period the general increase of <code class="notranslate">airflow_worker_healthcheck</code>.  It consumes ~45 MB per hour if the healthcheck occurs at 10 second intervals.</p>
<table role="table">
<thead>
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>Date</td>
<td>Container</td>
<td>CPU Percent</td>
<td>Mem Usage</td>
<td>Mem Percent</td>
</tr>
<tr>
<td>2022-01-21T19:17:57UTC</td>
<td>airflow_worker_no_healthcheck.1.z3lwru6mh22tzpe6dc8h8ekvi</td>
<td>0.47%</td>
<td>1.108GiB / 14.91GiB</td>
<td>7.43%</td>
</tr>
<tr>
<td>2022-01-21T19:17:57UTC</td>
<td>airflow_worker_healthcheck.1.vw9d1q18dx75v7w3zcfb7fypt</td>
<td>0.57%</td>
<td>1.1GiB / 14.91GiB</td>
<td>7.38%</td>
</tr>
<tr>
<td>2022-01-21T20:34:01UTC</td>
<td>airflow_worker_no_healthcheck.1.z3lwru6mh22tzpe6dc8h8ekvi</td>
<td>0.28%</td>
<td>1.108GiB / 14.91GiB</td>
<td>7.43%</td>
</tr>
<tr>
<td>2022-01-21T20:34:01UTC</td>
<td>airflow_worker_healthcheck.1.vw9d1q18dx75v7w3zcfb7fypt</td>
<td>0.76%</td>
<td>1.157GiB / 14.91GiB</td>
<td>7.76%</td>
</tr>
</tbody>
</table>
<p dir="auto"><em>collect_stats.sh</em></p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#!/usr/bin/env sh

echo &quot;Date,Container,CPU Percent,Mem Usage,Mem Percent&quot;
while true; do
    time=$(date --utc +%FT%T%Z)
    docker stats \
      --format &quot;table {{.Name}},{{.CPUPerc}},{{.MemUsage}},{{.MemPerc}}&quot; \
      --no-stream \
      | grep worker \
      | awk -vT=&quot;${time},&quot; '{ print T $0 }'
    sleep 10
done"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#!</span>/usr/bin/env sh</span>

<span class="pl-c1">echo</span> <span class="pl-s"><span class="pl-pds">"</span>Date,Container,CPU Percent,Mem Usage,Mem Percent<span class="pl-pds">"</span></span>
<span class="pl-k">while</span> <span class="pl-c1">true</span><span class="pl-k">;</span> <span class="pl-k">do</span>
    time=<span class="pl-s"><span class="pl-pds">$(</span>date --utc +%FT%T%Z<span class="pl-pds">)</span></span>
    docker stats \
      --format <span class="pl-s"><span class="pl-pds">"</span>table {{.Name}},{{.CPUPerc}},{{.MemUsage}},{{.MemPerc}}<span class="pl-pds">"</span></span> \
      --no-stream \
      <span class="pl-k">|</span> grep worker \
      <span class="pl-k">|</span> awk -vT=<span class="pl-s"><span class="pl-pds">"</span><span class="pl-smi">${time}</span>,<span class="pl-pds">"</span></span> <span class="pl-s"><span class="pl-pds">'</span>{ print T $0 }<span class="pl-pds">'</span></span>
    sleep 10
<span class="pl-k">done</span></pre></div>
<p dir="auto"><em>docker-compose.yaml</em></p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="---
version: '3.7'

networks:
  net:
    driver: overlay
    attachable: true

volumes:
  postgres-data:
  redis-data:

services:
  postgres:
    image: postgres:13.2-alpine
    volumes:
      - postgres-data:/var/lib/postgresql/data
    environment:
      POSTGRES_USER: airflow
      POSTGRES_PASSWORD: airflow
      POSTGRES_DB: airflow
    healthcheck:
      test: pg_isready -U airflow -d airflow
      interval: 10s
      timeout: 3s
      start_period: 15s
    ports:
      - '5432:5432'
    networks:
      - net

  redis:
    image: redis:6.2
    volumes:
      - redis-data:/data
    healthcheck:
      test: redis-cli ping
      interval: 10s
      timeout: 3s
      start_period: 15s
    ports:
      - '6379:6379'
    networks:
      - net

  webserver:
    image: apache/airflow:2.2.3-python3.8
    command:
      - bash
      - -c
      - 'airflow db init
      &amp;&amp; airflow db upgrade
      &amp;&amp; airflow users create --username admin --firstname Admin --lastname User --password admin --role Admin --email test@admin.org
      &amp;&amp; airflow webserver'
    environment:
      AIRFLOW__API__AUTH_BACKEND: airflow.api.auth.backend.basic_auth
      AIRFLOW__CELERY__BROKER_URL: redis://redis:6379/1
      AIRFLOW__CELERY__RESULT_BACKEND: db+postgresql://airflow:airflow@postgres:5432/airflow
      AIRFLOW__CORE__EXECUTOR: CeleryExecutor
      AIRFLOW__CORE__FERNET_KEY: yxfSDUw_7SG6BhBstIt7dFzL5rpnxvr_Jkv0tFyEJ3s=
      AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql://airflow:airflow@postgres:5432/airflow
      AIRFLOW__LOGGING__LOGGING_LEVEL: INFO
      AIRFLOW__WEBSERVER__SECRET_KEY: 0123456789
    healthcheck:
      test: curl --fail http://localhost:8080/health
      interval: 10s
      timeout: 10s
      retries: 10
      start_period: 90s
    ports:
      - '8080:8080'
    networks:
      - net

  scheduler:
    image: apache/airflow:2.2.3-python3.8
    command: scheduler
    environment:
      AIRFLOW__API__AUTH_BACKEND: airflow.api.auth.backend.basic_auth
      AIRFLOW__CELERY__BROKER_URL: redis://redis:6379/1
      AIRFLOW__CELERY__RESULT_BACKEND: db+postgresql://airflow:airflow@postgres:5432/airflow
      AIRFLOW__CORE__EXECUTOR: CeleryExecutor
      AIRFLOW__CORE__FERNET_KEY: yxfSDUw_7SG6BhBstIt7dFzL5rpnxvr_Jkv0tFyEJ3s=
      AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql://airflow:airflow@postgres:5432/airflow
      AIRFLOW__LOGGING__LOGGING_LEVEL: INFO
      AIRFLOW__WEBSERVER__SECRET_KEY: 0123456789
    healthcheck:
      test: airflow db check
      interval: 20s
      timeout: 10s
      retries: 5
      start_period: 40s
    networks:
      - net

  worker_healthcheck:
    image: apache/airflow:2.2.3-python3.8
    command: celery worker
    environment:
      AIRFLOW__API__AUTH_BACKEND: airflow.api.auth.backend.basic_auth
      AIRFLOW__CELERY__BROKER_URL: redis://redis:6379/1
      AIRFLOW__CELERY__RESULT_BACKEND: db+postgresql://airflow:airflow@postgres:5432/airflow
      AIRFLOW__CORE__EXECUTOR: CeleryExecutor
      AIRFLOW__CORE__FERNET_KEY: yxfSDUw_7SG6BhBstIt7dFzL5rpnxvr_Jkv0tFyEJ3s=
      AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql://airflow:airflow@postgres:5432/airflow
      AIRFLOW__LOGGING__LOGGING_LEVEL: DEBUG
      AIRFLOW__WEBSERVER__SECRET_KEY: 0123456789
    healthcheck:
      test:
        - &quot;CMD-SHELL&quot;
        - 'celery --app airflow.executors.celery_executor.app inspect ping -d &quot;celery@$${HOSTNAME}&quot;'
      interval: 10s
      timeout: 10s
      retries: 5
      start_period: 40s
    networks:
      - net

  worker_no_healthcheck:
    image: apache/airflow:2.2.3-python3.8
    command: celery worker
    environment:
      AIRFLOW__API__AUTH_BACKEND: airflow.api.auth.backend.basic_auth
      AIRFLOW__CELERY__BROKER_URL: redis://redis:6379/1
      AIRFLOW__CELERY__RESULT_BACKEND: db+postgresql://airflow:airflow@postgres:5432/airflow
      AIRFLOW__CORE__EXECUTOR: CeleryExecutor
      AIRFLOW__CORE__FERNET_KEY: yxfSDUw_7SG6BhBstIt7dFzL5rpnxvr_Jkv0tFyEJ3s=
      AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql://airflow:airflow@postgres:5432/airflow
      AIRFLOW__LOGGING__LOGGING_LEVEL: DEBUG
      AIRFLOW__WEBSERVER__SECRET_KEY: 0123456789
    networks:
      - net"><pre class="notranslate">---
<span class="pl-ent">version</span>: <span class="pl-s"><span class="pl-pds">'</span>3.7<span class="pl-pds">'</span></span>

<span class="pl-ent">networks</span>:
  <span class="pl-ent">net</span>:
    <span class="pl-ent">driver</span>: <span class="pl-s">overlay</span>
    <span class="pl-ent">attachable</span>: <span class="pl-c1">true</span>

<span class="pl-ent">volumes</span>:
  <span class="pl-ent">postgres-data</span>:
  <span class="pl-ent">redis-data</span>:

<span class="pl-ent">services</span>:
  <span class="pl-ent">postgres</span>:
    <span class="pl-ent">image</span>: <span class="pl-s">postgres:13.2-alpine</span>
    <span class="pl-ent">volumes</span>:
      - <span class="pl-s">postgres-data:/var/lib/postgresql/data</span>
    <span class="pl-ent">environment</span>:
      <span class="pl-ent">POSTGRES_USER</span>: <span class="pl-s">airflow</span>
      <span class="pl-ent">POSTGRES_PASSWORD</span>: <span class="pl-s">airflow</span>
      <span class="pl-ent">POSTGRES_DB</span>: <span class="pl-s">airflow</span>
    <span class="pl-ent">healthcheck</span>:
      <span class="pl-ent">test</span>: <span class="pl-s">pg_isready -U airflow -d airflow</span>
      <span class="pl-ent">interval</span>: <span class="pl-c1">10s</span>
      <span class="pl-ent">timeout</span>: <span class="pl-c1">3s</span>
      <span class="pl-ent">start_period</span>: <span class="pl-c1">15s</span>
    <span class="pl-ent">ports</span>:
      - <span class="pl-s"><span class="pl-pds">'</span>5432:5432<span class="pl-pds">'</span></span>
    <span class="pl-ent">networks</span>:
      - <span class="pl-s">net</span>

  <span class="pl-ent">redis</span>:
    <span class="pl-ent">image</span>: <span class="pl-s">redis:6.2</span>
    <span class="pl-ent">volumes</span>:
      - <span class="pl-s">redis-data:/data</span>
    <span class="pl-ent">healthcheck</span>:
      <span class="pl-ent">test</span>: <span class="pl-s">redis-cli ping</span>
      <span class="pl-ent">interval</span>: <span class="pl-c1">10s</span>
      <span class="pl-ent">timeout</span>: <span class="pl-c1">3s</span>
      <span class="pl-ent">start_period</span>: <span class="pl-c1">15s</span>
    <span class="pl-ent">ports</span>:
      - <span class="pl-s"><span class="pl-pds">'</span>6379:6379<span class="pl-pds">'</span></span>
    <span class="pl-ent">networks</span>:
      - <span class="pl-s">net</span>

  <span class="pl-ent">webserver</span>:
    <span class="pl-ent">image</span>: <span class="pl-s">apache/airflow:2.2.3-python3.8</span>
    <span class="pl-ent">command</span>:
      - <span class="pl-s">bash</span>
      - <span class="pl-s">-c</span>
      - <span class="pl-s"><span class="pl-pds">'</span>airflow db init</span>
<span class="pl-s">      &amp;&amp; airflow db upgrade</span>
<span class="pl-s">      &amp;&amp; airflow users create --username admin --firstname Admin --lastname User --password admin --role Admin --email test@admin.org</span>
<span class="pl-s">      &amp;&amp; airflow webserver<span class="pl-pds">'</span></span>
    <span class="pl-ent">environment</span>:
      <span class="pl-ent">AIRFLOW__API__AUTH_BACKEND</span>: <span class="pl-s">airflow.api.auth.backend.basic_auth</span>
      <span class="pl-ent">AIRFLOW__CELERY__BROKER_URL</span>: <span class="pl-s">redis://redis:6379/1</span>
      <span class="pl-ent">AIRFLOW__CELERY__RESULT_BACKEND</span>: <span class="pl-s">db+postgresql://airflow:airflow@postgres:5432/airflow</span>
      <span class="pl-ent">AIRFLOW__CORE__EXECUTOR</span>: <span class="pl-s">CeleryExecutor</span>
      <span class="pl-ent">AIRFLOW__CORE__FERNET_KEY</span>: <span class="pl-s">yxfSDUw_7SG6BhBstIt7dFzL5rpnxvr_Jkv0tFyEJ3s=</span>
      <span class="pl-ent">AIRFLOW__CORE__SQL_ALCHEMY_CONN</span>: <span class="pl-s">postgresql://airflow:airflow@postgres:5432/airflow</span>
      <span class="pl-ent">AIRFLOW__LOGGING__LOGGING_LEVEL</span>: <span class="pl-s">INFO</span>
      <span class="pl-ent">AIRFLOW__WEBSERVER__SECRET_KEY</span>: <span class="pl-c1">0123456789</span>
    <span class="pl-ent">healthcheck</span>:
      <span class="pl-ent">test</span>: <span class="pl-s">curl --fail http://localhost:8080/health</span>
      <span class="pl-ent">interval</span>: <span class="pl-c1">10s</span>
      <span class="pl-ent">timeout</span>: <span class="pl-c1">10s</span>
      <span class="pl-ent">retries</span>: <span class="pl-c1">10</span>
      <span class="pl-ent">start_period</span>: <span class="pl-c1">90s</span>
    <span class="pl-ent">ports</span>:
      - <span class="pl-s"><span class="pl-pds">'</span>8080:8080<span class="pl-pds">'</span></span>
    <span class="pl-ent">networks</span>:
      - <span class="pl-s">net</span>

  <span class="pl-ent">scheduler</span>:
    <span class="pl-ent">image</span>: <span class="pl-s">apache/airflow:2.2.3-python3.8</span>
    <span class="pl-ent">command</span>: <span class="pl-s">scheduler</span>
    <span class="pl-ent">environment</span>:
      <span class="pl-ent">AIRFLOW__API__AUTH_BACKEND</span>: <span class="pl-s">airflow.api.auth.backend.basic_auth</span>
      <span class="pl-ent">AIRFLOW__CELERY__BROKER_URL</span>: <span class="pl-s">redis://redis:6379/1</span>
      <span class="pl-ent">AIRFLOW__CELERY__RESULT_BACKEND</span>: <span class="pl-s">db+postgresql://airflow:airflow@postgres:5432/airflow</span>
      <span class="pl-ent">AIRFLOW__CORE__EXECUTOR</span>: <span class="pl-s">CeleryExecutor</span>
      <span class="pl-ent">AIRFLOW__CORE__FERNET_KEY</span>: <span class="pl-s">yxfSDUw_7SG6BhBstIt7dFzL5rpnxvr_Jkv0tFyEJ3s=</span>
      <span class="pl-ent">AIRFLOW__CORE__SQL_ALCHEMY_CONN</span>: <span class="pl-s">postgresql://airflow:airflow@postgres:5432/airflow</span>
      <span class="pl-ent">AIRFLOW__LOGGING__LOGGING_LEVEL</span>: <span class="pl-s">INFO</span>
      <span class="pl-ent">AIRFLOW__WEBSERVER__SECRET_KEY</span>: <span class="pl-c1">0123456789</span>
    <span class="pl-ent">healthcheck</span>:
      <span class="pl-ent">test</span>: <span class="pl-s">airflow db check</span>
      <span class="pl-ent">interval</span>: <span class="pl-c1">20s</span>
      <span class="pl-ent">timeout</span>: <span class="pl-c1">10s</span>
      <span class="pl-ent">retries</span>: <span class="pl-c1">5</span>
      <span class="pl-ent">start_period</span>: <span class="pl-c1">40s</span>
    <span class="pl-ent">networks</span>:
      - <span class="pl-s">net</span>

  <span class="pl-ent">worker_healthcheck</span>:
    <span class="pl-ent">image</span>: <span class="pl-s">apache/airflow:2.2.3-python3.8</span>
    <span class="pl-ent">command</span>: <span class="pl-s">celery worker</span>
    <span class="pl-ent">environment</span>:
      <span class="pl-ent">AIRFLOW__API__AUTH_BACKEND</span>: <span class="pl-s">airflow.api.auth.backend.basic_auth</span>
      <span class="pl-ent">AIRFLOW__CELERY__BROKER_URL</span>: <span class="pl-s">redis://redis:6379/1</span>
      <span class="pl-ent">AIRFLOW__CELERY__RESULT_BACKEND</span>: <span class="pl-s">db+postgresql://airflow:airflow@postgres:5432/airflow</span>
      <span class="pl-ent">AIRFLOW__CORE__EXECUTOR</span>: <span class="pl-s">CeleryExecutor</span>
      <span class="pl-ent">AIRFLOW__CORE__FERNET_KEY</span>: <span class="pl-s">yxfSDUw_7SG6BhBstIt7dFzL5rpnxvr_Jkv0tFyEJ3s=</span>
      <span class="pl-ent">AIRFLOW__CORE__SQL_ALCHEMY_CONN</span>: <span class="pl-s">postgresql://airflow:airflow@postgres:5432/airflow</span>
      <span class="pl-ent">AIRFLOW__LOGGING__LOGGING_LEVEL</span>: <span class="pl-s">DEBUG</span>
      <span class="pl-ent">AIRFLOW__WEBSERVER__SECRET_KEY</span>: <span class="pl-c1">0123456789</span>
    <span class="pl-ent">healthcheck</span>:
      <span class="pl-ent">test</span>:
        - <span class="pl-s"><span class="pl-pds">"</span>CMD-SHELL<span class="pl-pds">"</span></span>
        - <span class="pl-s"><span class="pl-pds">'</span>celery --app airflow.executors.celery_executor.app inspect ping -d "celery@$${HOSTNAME}"<span class="pl-pds">'</span></span>
      <span class="pl-ent">interval</span>: <span class="pl-c1">10s</span>
      <span class="pl-ent">timeout</span>: <span class="pl-c1">10s</span>
      <span class="pl-ent">retries</span>: <span class="pl-c1">5</span>
      <span class="pl-ent">start_period</span>: <span class="pl-c1">40s</span>
    <span class="pl-ent">networks</span>:
      - <span class="pl-s">net</span>

  <span class="pl-ent">worker_no_healthcheck</span>:
    <span class="pl-ent">image</span>: <span class="pl-s">apache/airflow:2.2.3-python3.8</span>
    <span class="pl-ent">command</span>: <span class="pl-s">celery worker</span>
    <span class="pl-ent">environment</span>:
      <span class="pl-ent">AIRFLOW__API__AUTH_BACKEND</span>: <span class="pl-s">airflow.api.auth.backend.basic_auth</span>
      <span class="pl-ent">AIRFLOW__CELERY__BROKER_URL</span>: <span class="pl-s">redis://redis:6379/1</span>
      <span class="pl-ent">AIRFLOW__CELERY__RESULT_BACKEND</span>: <span class="pl-s">db+postgresql://airflow:airflow@postgres:5432/airflow</span>
      <span class="pl-ent">AIRFLOW__CORE__EXECUTOR</span>: <span class="pl-s">CeleryExecutor</span>
      <span class="pl-ent">AIRFLOW__CORE__FERNET_KEY</span>: <span class="pl-s">yxfSDUw_7SG6BhBstIt7dFzL5rpnxvr_Jkv0tFyEJ3s=</span>
      <span class="pl-ent">AIRFLOW__CORE__SQL_ALCHEMY_CONN</span>: <span class="pl-s">postgresql://airflow:airflow@postgres:5432/airflow</span>
      <span class="pl-ent">AIRFLOW__LOGGING__LOGGING_LEVEL</span>: <span class="pl-s">DEBUG</span>
      <span class="pl-ent">AIRFLOW__WEBSERVER__SECRET_KEY</span>: <span class="pl-c1">0123456789</span>
    <span class="pl-ent">networks</span>:
      - <span class="pl-s">net</span></pre></div>
<h3 dir="auto">Operating System</h3>
<p dir="auto">Ubuntu 20.04.3 LTS</p>
<h3 dir="auto">Versions of Apache Airflow Providers</h3>
<p dir="auto">Using the base Python 3.8 Docker images from,<br>
<a href="https://hub.docker.com/layers/apache/airflow/2.2.3-python3.8/images/sha256-a8c86724557a891104e91da8296157b4cabd73d81011ee1f733cbb7bbe61d374?context=explore" rel="nofollow">https://hub.docker.com/layers/apache/airflow/2.2.3-python3.8/images/sha256-a8c86724557a891104e91da8296157b4cabd73d81011ee1f733cbb7bbe61d374?context=explore</a><br>
<a href="https://hub.docker.com/layers/apache/airflow/2.1.4-python3.8/images/sha256-d14244034721583a4a2d9760ffc9673307a56be5d8c248df02c466ca86704763?context=explore" rel="nofollow">https://hub.docker.com/layers/apache/airflow/2.1.4-python3.8/images/sha256-d14244034721583a4a2d9760ffc9673307a56be5d8c248df02c466ca86704763?context=explore</a></p>
<h3 dir="auto">Deployment</h3>
<p dir="auto">Docker-Compose is included above.</p>
<h3 dir="auto">Deployment details</h3>
<p dir="auto">Tested with Python 3.8 images</p>
<h3 dir="auto">Anything else</h3>
<p dir="auto">We did not see similar issues with the Webserver or Scheduler deployments.</p>
<p dir="auto">I and my colleague think this might be related to some underlying Celery memory leaks.  He has informed me of an upcoming release which includes <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1058421992" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/19703" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/19703/hovercard" href="https://github.com/apache/airflow/pull/19703">#19703</a>.  I'd be interested to see if a similar issue occurs with the newer version.</p>
<p dir="auto">I don't believe there's much else that can be done on Airflow's part here besides upgrading Celery.  I just wanted to bring awareness to this outstanding issue.  We are currently in search for a different healthcheck which potentially avoids Celery.  If there are suggestions, I would gladly create a PR to update the documented compose file.</p>
<p dir="auto">Other related issues may be:<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="335069356" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/4843" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/4843/hovercard" href="https://github.com/celery/celery/issues/4843">celery/celery#4843</a><br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1086281567" data-permission-text="Title is private" data-url="https://github.com/celery/kombu/issues/1470" data-hovercard-type="pull_request" data-hovercard-url="/celery/kombu/pull/1470/hovercard" href="https://github.com/celery/kombu/pull/1470">celery/kombu#1470</a></p>
<h3 dir="auto">Are you willing to submit PR?</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Yes I am willing to submit a PR!</li>
</ul>
<h3 dir="auto">Code of Conduct</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li>
</ul>