perf: enable Gunicorn preload_app to reduce memory per worker (#12364)

* fix: enable preload_app option in LangflowApplication configuration

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

* Make flag configurable

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* [autofix.ci] apply automated fixes (attempt 3/3)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@logspace.ai>
Co-authored-by: ogabrielluiz <gabriel@langflow.org>
Co-authored-by: Jordan Frazier <jordan.frazier@datastax.com>
Co-authored-by: Jordan Frazier <122494242+jordanrfrazier@users.noreply.github.com>
This commit is contained in:
Arek Mateusiak
2026-04-09 03:24:07 +02:00
committed by GitHub
parent 87ff7a6cbe
commit afbc6b0db3

View File

@ -413,6 +413,7 @@ def run(
"certfile": ssl_cert_file_path,
"keyfile": ssl_key_file_path,
"log_level": log_level.lower() if log_level is not None else "info",
"preload_app": os.environ.get("LANGFLOW_GUNICORN_PRELOAD", "false").lower() == "true",
}
server = LangflowApplication(app, options)