Closed fzhan closed 6 months ago
Hi,
Which is the platform you are using to deploy airflow? Maybe it requires more resources.
@javsalgar the k8s cluster has 5 nodes, each 64GB x 2.3 20 core CPU.
I'm running other application such as superset, on the same platform, all loading fine, and the fact docker version of airflow (as indicated above) loads perfectly.
Hi @fzhan,
I found this issue in the airflow repo https://github.com/apache/airflow/issues/8907. Could you check it?
@Mauraza i've gone through and implemented gevent, and turned off LoadBalancer back to ClusterIP. But it almost feel like the ingress is not telling browser these JS/CSS can be cached.
Below is the docker image, where everything loads in ms:
That's really strange
@Mauraza I've added this snippet to ingress annotation and things starts to speed up (load from memory):
annotations:
...
nginx.ingress.kubernetes.io/configuration-snippet: |
if ($request_uri ~* \.(js|css|gif|jpe?g|png)) {
expires 5d;
add_header Cache-Control "public";
}
Not sure if this is worth looking into but there should be some kind of gunicorn config which may / may not worked for requesting page resources.
Hi @fzhan,
It's strange... where are you running the chart?
on a local microk8s cluster with 5 nodes.
None of the other packages with ingress had issue like this, especially those that uses gunicorn.
Hi @fzhan,
Appears some strange events in the kubectl describe
?
Name: airflow-web
Namespace: airflow
CreationTimestamp: Wed, 14 Feb 2024 00:28:29 +1100
Labels: app.kubernetes.io/component=web
app.kubernetes.io/instance=airflow
app.kubernetes.io/managed-by=Helm
app.kubernetes.io/name=airflow
app.kubernetes.io/version=2.0.0
helm.sh/chart=airflow-16.8.2
Annotations: deployment.kubernetes.io/revision: 3
meta.helm.sh/release-name: airflow
meta.helm.sh/release-namespace: airflow
Selector: app.kubernetes.io/component=web,app.kubernetes.io/instance=airflow,app.kubernetes.io/name=airflow
Replicas: 1 desired | 1 updated | 1 total | 1 available | 0 unavailable
StrategyType: RollingUpdate
MinReadySeconds: 0
RollingUpdateStrategy: 25% max unavailable, 25% max surge
Pod Template:
Labels: app.kubernetes.io/component=web
app.kubernetes.io/instance=airflow
app.kubernetes.io/managed-by=Helm
app.kubernetes.io/name=airflow
app.kubernetes.io/version=2.0.0
helm.sh/chart=airflow-16.8.2
Annotations: checksum/configmap: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b
Service Account: airflow
Containers:
airflow-web:
Image: docker.io/bitnami/airflow:2-debian-11
Port: 8080/TCP
Host Port: 0/TCP
SeccompProfile: RuntimeDefault
Liveness: tcp-socket :http delay=180s timeout=5s period=20s #success=1 #failure=6
Readiness: tcp-socket :http delay=30s timeout=5s period=10s #success=1 #failure=6
Environment:
AIRFLOW_FERNET_KEY: <set to the key 'airflow-fernet-key' in secret 'airflow'> Optional: false
AIRFLOW_SECRET_KEY: <set to the key 'airflow-secret-key' in secret 'airflow'> Optional: false
AIRFLOW_LOAD_EXAMPLES: no
BASH_DEBUG: 1
BITNAMI_DEBUG: true
AIRFLOW_DATABASE_NAME: x
AIRFLOW_DATABASE_USERNAME: x
AIRFLOW_DATABASE_PASSWORD: <set to the key 'password' in secret 'airflow-externaldb'> Optional: false
AIRFLOW_DATABASE_HOST: postgresql-primary.postgres
AIRFLOW_DATABASE_PORT_NUMBER: 5432
REDIS_HOST: redis-master.x
REDIS_PORT_NUMBER: 6379
REDIS_PASSWORD: <set to the key 'redis-password' in secret 'airflow-externalredis'> Optional: false
AIRFLOW_EXECUTOR: CeleryExecutor
AIRFLOW_WEBSERVER_HOST: 0.0.0.0
AIRFLOW_WEBSERVER_PORT_NUMBER: 8080
AIRFLOW_USERNAME: x
AIRFLOW_PASSWORD: <set to the key 'airflow-password' in secret 'airflow'> Optional: false
AIRFLOW_BASE_URL: http://x:8080
AIRFLOW_LDAP_ENABLE: no
AIRFLOW__WEBSERVER__WORKER_CLASS: gevent
AIRFLOW__CODE_EDITOR__ENABLED: True
AIRFLOW__CODE_EDITOR__ROOT_DIRECTORY: /opt/bitnami/airflow/dags
AIRFLOW__CODE_EDITOR__STRING_NORMALIZATION: True
AIRFLOW__CODE_EDITOR__MOUNT: name=logs,path=/opt/bitnami/airflow/logs
_AIRFLOW_PATCH_GEVENT: 1
AIRFLOW__CORE__DEFAULT_TIMEZONE: Australia/Melbourne
AIRFLOW__WEBSERVER__DEFAULT_UI_TIMEZONE: Australia/Melbourne
Mounts:
/bitnami/python/requirements.txt from requirements (rw,path="requirements.txt")
/opt/bitnami/airflow/dags from airflow-dag (rw)
Volumes:
airflow-dag:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: airflow-dags
ReadOnly: false
requirements:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: airflow-requirements
Optional: false
Conditions:
Type Status Reason
---- ------ ------
Available True MinimumReplicasAvailable
Progressing True NewReplicaSetAvailable
OldReplicaSets: <none>
NewReplicaSet: airflow-web-69c54b9bf8 (1/1 replicas created)
Events: <none>
Not really anything strange in the deployment @Mauraza
Did you check if it could be related to a DNS problem? (documentation )
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.
Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.
Name and Version
bitnami/airflow-16.5.3
What architecture are you using?
None
What steps will reproduce the bug?
which is not the when running from docker:
Are you using any custom parameters or values?
Using loadBalancer (metallb) / ingress. Every other services / apps loads fine, behind load balancer and SSL port 443 as well.
values.yaml:
What is the expected behavior?
Each page / style / js shouldn't take more than 10ms to load
What do you see instead?
Each load takes more than 5s
Additional information
No response