Spaces:
Running
Running
fix: drop uvicorn to 1 worker to prevent SQLite CREATE TABLE race
Browse filesWith --workers 2, both processes run Base.metadata.create_all
simultaneously. SQLite has no IF NOT EXISTS guard in DeerFlow's
engine.py, so the second worker always fails with
"table feedback already exists" and gets killed/restarted.
Single worker eliminates the race; SQLite is single-writer anyway.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
start.sh
CHANGED
|
@@ -362,7 +362,7 @@ echo "Starting DeerFlow backend on port $BACKEND_PORT..."
|
|
| 362 |
uvicorn app.gateway.app:app \
|
| 363 |
--host 127.0.0.1 \
|
| 364 |
--port "$BACKEND_PORT" \
|
| 365 |
-
--workers
|
| 366 |
2>&1 | tee -a "$DATA_DIR/logs/backend.log"
|
| 367 |
) &
|
| 368 |
BACKEND_PID=$!
|
|
|
|
| 362 |
uvicorn app.gateway.app:app \
|
| 363 |
--host 127.0.0.1 \
|
| 364 |
--port "$BACKEND_PORT" \
|
| 365 |
+
--workers 1 \
|
| 366 |
2>&1 | tee -a "$DATA_DIR/logs/backend.log"
|
| 367 |
) &
|
| 368 |
BACKEND_PID=$!
|