You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/lfx/README.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -435,9 +435,13 @@ uv run lfx serve my-flow.json --upgrade-flow=safe
435
435
|`--no-env-fallback` / `--env-fallback`| Disable process-environment fallback for credential resolution. Use with per-request `LANGFLOW_REQUEST_VARIABLES`. Default: `--env-fallback`. |
436
436
|`--port`, `-p`| Port to bind the server to. Default: `8000`. |
437
437
|`--stdin`| Read JSON flow content from `stdin`. Example: `cat flow.json | uv run lfx serve --stdin`. |
438
+
|`--max-requests`| Recycle each worker after N requests to bound memory (gunicorn, Unix, `--workers > 1`). Default: every ~1000 (10% jitter); `0` disables; `1` = every request. Worker hygiene, **not** per-request isolation. Not applied on Windows. |
439
+
|`--reset-environ` / `--no-reset-environ`| Snapshot/restore `os.environ` around each flow run so one request's env mutations or request-scoped credentials can't leak into the next on a warm worker. **A strict per-request isolation mechanism** (any worker, any platform). Default: `--no-reset-environ` (off). |
440
+
|`--use-sync-workers` / `--use-async-workers`| Multi-worker only (`--workers > 1`, Unix). gunicorn's blocking `sync` worker serves one request at a time per worker, so the kernel routes each to an idle worker. With `--max-requests 1` it is **the other strict per-request isolation mechanism** (each request gets a fresh process). Uses the `a2wsgi` bridge, which ships with lfx on Unix. Default: `--use-async-workers`. |
441
+
|`--timeout`| Worker timeout in seconds (gunicorn, Unix, `--workers > 1`): a worker that doesn't finish a request in this many seconds is killed and restarted. Raise it for long flows, especially with `--use-sync-workers`. Default: `120`. No effect on Windows. |
438
442
|`--upgrade-flow`| Compatibility mode: `check` reports issues and fails, `safe` applies safe upgrades in memory. |
439
443
|`--verbose`, `-v`| Show diagnostic output and execution details. |
440
-
|`--workers`, `-w`| Number of uvicorn worker processes. Default: `1`. Use with `--flow-dir` for multi-worker flow sharing. |
444
+
|`--workers`, `-w`| Number of worker processes. Use with `--flow-dir` for multi-worker flow sharing. Default: `1`. |
0 commit comments