### Body

Recently, [this test](https://github.com/apache/airflow/blob/9de301da2a44385f57be5407e80e16ee376f3d39/tests/cli/commands/test_internal_api_command.py#L134-L137) began to failed with timeout error and it has affected all tests in single CI run. As temporary solution this test was marked as `quarantined`.

We should figure out why it happen and try to resolve it.



### Committer

- [X] I acknowledge that I am a maintainer/committer of the Apache Airflow project.
start_time = time.monotonic()
        while True:
            try:
                with open(pidfile) as file:
                    return int(file.read())
            except Exception:
                if start_time - time.monotonic() > 60:
                    raise
                time.sleep(1)
    @pytest.mark.quarantined
    @pytest.mark.execution_timeout(210)
    def test_cli_internal_api_background(self):
        with tempfile.TemporaryDirectory(prefix="gunicorn") as tmpdir:
            pidfile_internal_api = f"{tmpdir}/pidflow-internal-api.pid"
            pidfile_monitor = f"{tmpdir}/pidflow-internal-api-monitor.pid"
            stdout = f"{tmpdir}/airflow-internal-api.out"
            stderr = f"{tmpdir}/airflow-internal-api.err"
            logfile = f"{tmpdir}/airflow-internal-api.log"
            try:
                
                proc = subprocess.Popen(
                    [
                        "airflow",
                        "internal-api",
                        "--daemon",
                        "--pid",
                        pidfile_internal_api,
                        "--stdout",
                        stdout,
                        "--stderr",