gdevanla opened a new issue #14034:
URL: https://github.com/apache/airflow/issues/14034
<!--
Welcome to Apache Airflow! For a smooth issue process, try to answer the
following questions.
Don't worry if they're not all applicable; just try to include what you can
:-)
If you need to include code snippets or logs, please put them in fenced code
blocks. If they're super-long, please use the details tag like
<details><summary>super-long log</summary> lots of stuff </details>
Please delete these comment blocks before submitting the issue.
-->
<!--
IMPORTANT!!!
PLEASE CHECK "SIMILAR TO X EXISTING ISSUES" OPTION IF VISIBLE
NEXT TO "SUBMIT NEW ISSUE" BUTTON!!!
PLEASE CHECK IF THIS ISSUE HAS BEEN REPORTED PREVIOUSLY USING SEARCH!!!
Please complete the next sections or the issue will be closed.
These questions are the first thing we need to know to understand the
context.
-->
**Apache Airflow version**:
2.0.0
**Kubernetes version (if you are using kubernetes)** (use `kubectl version`):
**Environment**:
- **Cloud provider or hardware configuration**:
- **OS** (e.g. from /etc/os-release): "18.04.1 LTS (Bionic Beaver)"
- **Kernel** (e.g. `uname -a`): 4.15.0-130-generic #134-Ubuntu
- **Install tools**:
- **Others**:
**What happened**:
I am observing real slow start up time when starting the webserver (compared
to startup time from previous versions). With one workers, than start up time
is close to 2 minutes.
Some observations, as I look at the logs (attached)
1. Registering routes seems to take ~25 seconds
2. Adding security decorators seems to take ~12 seconds
Then, I see this message:
```
[2021-02-02 06:36:45,875] {security.py:398} DEBUG - Cleaning faulty perms
Running the Gunicorn Server with:
Workers: 1 sync
Host: 0.0.0.0:8080
Timeout: 120
Logfiles: - -
Access Logformat:
=================================================================
[2021-02-02 06:36:46,059] {cli_action_loggers.py:84} DEBUG - Calling
callbacks: []
[2021-02-02 06:36:46,063] {settings.py:290} DEBUG - Disposing DB connection
pool (PID 24448)
[2021-02-02 06:36:46,487] {settings.py:208} DEBUG - Setting up DB connection
pool (PID 24684)
[2021-02-02 06:36:46,487] {settings.py:273} DEBUG -
settings.prepare_engine_args(): Using pool settings. pool_size=5,
max_overflow=10, pool_recycle=1800, pid=24684
```
3. After that, the `Registering route` routines kickin for the second time
and the entire process repeats once more.
So, effectively, we are re-running all startup related process twice.
**What you expected to happen**:
Could be useful if we could speed this up. Helps in iterative development of
plugins.
I think I may be missing some `timeout` value, which is causing the process
to recycle in a minute.
**How to reproduce it**:
airflow_webserver -w 1
As minimally and precisely as possible. Keep in mind we do not have access
to your cluster or dags.
If you are using kubernetes, please attempt to recreate the issue using
minikube or kind.
## Install minikube/kind
- Minikube https://minikube.sigs.k8s.io/docs/start/
- Kind https://kind.sigs.k8s.io/docs/user/quick-start/
If this is a UI bug, please provide a screenshot of the bug or a link to a
youtube video of the bug in action
You can include images using the .md style of

To record a screencast, mac users can use QuickTime and then create an
unlisted youtube video with the resulting .mov file.
--->
**Anything else we need to know**:
<!--
How often does this problem occur? Once? Every time etc?
Any relevant logs to include? Put them here in side a detail tag:
<details><summary>x.log</summary> lots of stuff </details>
-->
[airflow_web_non_debug.log](https://github.com/apache/airflow/files/5912041/airflow_web_non_debug.log)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]