potiuk commented on a change in pull request #9378:
URL: https://github.com/apache/airflow/pull/9378#discussion_r442270993
##########
File path: Dockerfile.ci
##########
@@ -315,6 +315,9 @@ WORKDIR ${AIRFLOW_SOURCES}
ENV PATH="${HOME}:${PATH}"
+# Needed to stop Gunicorn from crashing when /tmp is now mounted from host
+ENV GUNICORN_CMD_ARGS="--worker-tmp-dir /opt/airflow/tmp"
Review comment:
> I used the env var approach because that is the easiest way if you do
not have access to the env directly.
@feluelle @ashb -> the ENV approach is good to go. Seems this has the right
characteristics. - it will take precedence over other methods
(conf/commandline) but you can still specify other options. So I think for CI
image it's good to go - but for production image definitely this approach is
better:
```
export GUNICORN_CMD_ARGS="${GUNICORN_CMD_ARGS:-} --worker-tmp-dir /dev/shm"
```
I also decided to use /dev/shm as suggested by
https://docs.gunicorn.org/en/stable/faq.html#how-do-i-avoid-gunicorn-excessively-blocking-in-os-fchmod:
----------------------------------------------------------------
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]