somratpro Claude Sonnet 4.6 commited on
Commit
e778d47
·
1 Parent(s): 9eceb2e

fix: drop uvicorn to 1 worker to prevent SQLite CREATE TABLE race

Browse files

With --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>

Files changed (1) hide show
  1. start.sh +1 -1
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 2 \
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=$!