Saifeddine ALOUI
5680e9ef11
Update lightrag_server.py
2025-03-03 12:24:49 +01:00
Saifeddine ALOUI
7b3e394730
Update run_with_gunicorn.py
2025-03-03 12:23:47 +01:00
Saifeddine ALOUI
52bedc9118
Update run_with_gunicorn.py
2025-03-03 12:22:37 +01:00
Saifeddine ALOUI
bda931e1d2
Update run_with_gunicorn.py
2025-03-03 12:21:50 +01:00
Saifeddine ALOUI
e87feb76bc
Update run_with_gunicorn.py
2025-03-03 12:21:15 +01:00
Saifeddine ALOUI
ff3f29d240
Update run_with_gunicorn.py
2025-03-03 12:13:01 +01:00
Saifeddine ALOUI
7a866cbe21
Update run_with_gunicorn.py
2025-03-03 11:48:43 +01:00
yangdx
aa5888042e
Improved file handling and validation for document processing
...
• Enhanced UTF-8 validation for text files
• Added content validation checks
• Better handling of binary data
• Added logging for ignored document IDs
• Improved document ID filtering
2025-03-02 23:57:57 +08:00
yangdx
644ed15d75
Merge branch 'add-multi-worker-support' into max-graph-node
2025-03-02 18:37:56 +08:00
yangdx
fca6969b0b
Update Gunicorn startup instructions in API documentation
2025-03-02 18:33:18 +08:00
yangdx
7a8bd15203
Merge branch 'add-multi-worker-support' into max-graph-node
2025-03-02 18:24:22 +08:00
yangdx
fb5f11f594
Add Gunicorn support for production deployment of LightRAG server
...
- Move gunicorn startup an config files to api package
- Create new CLI entry point for Gunicorn mode
2025-03-02 18:17:51 +08:00
yangdx
465737efed
Fix linting
2025-03-02 17:32:25 +08:00
yangdx
1ca6837219
Add max nodes limit for graph retrieval of networkX
...
• Set MAX_GRAPH_NODES env var (default 1000)
• Change edge type to "RELATED"
2025-03-02 12:52:25 +08:00
yangdx
e20aeada92
docs: add gunicorn deployment guide and update server
2025-03-02 02:43:11 +08:00
yangdx
8d6960f280
Fix linting
2025-03-02 00:13:11 +08:00
yangdx
f76cf98dbd
Add automatic dependency checking and installation for server startup
...
• Added check_and_install_dependencies()
• Install missing dependencies automatically
2025-03-02 00:04:59 +08:00
yangdx
e8d0d065f3
fix: Improve async handling and FAISS storage reliability
...
- Add async context manager support
- Fix embedding data type conversion
- Improve error handling in FAISS ops
- Add multiprocess storage sync
2025-03-01 23:35:09 +08:00
yangdx
3507e894d9
Merge branch 'main' into add-multi-worker-support
2025-03-01 15:55:37 +08:00
yangdx
40e9e26edb
feat: add update flags status to API health endpoint
2025-03-01 14:58:26 +08:00
yangdx
c07a5039b7
Refactor shared storage locks to separate pipeline, storage and internal locks for deadlock preventing
2025-03-01 10:48:55 +08:00
yangdx
d704512139
Refactor shared storage module to improve async handling and naming consistency
...
• Add async support for get_namespace_data
• Rename get_update_flags to get_update_flag
• Rename set_update_flag to set_all_update_flags
• Update docstrings for clarity
• Fix typos in log messages
2025-03-01 05:01:26 +08:00
yangdx
fd76e00c6a
Refactor storage initialization to separate object creation from data loading
...
• Split __post_init__ and initialize()
• Move data loading to initialize()
• Add FastAPI lifespan integration
2025-03-01 03:48:19 +08:00
yangdx
b3328542c7
refactor: migrate synchronous locks to async locks for improved concurrency
...
• Add UnifiedLock wrapper class
• Convert with blocks to async with
2025-03-01 02:22:35 +08:00
yangdx
aac1bdd9e6
feat: add configurable log rotation settings via environment variables
...
• Add LOG_DIR env var for log file location
• Add LOG_MAX_BYTES for max log file size
• Add LOG_BACKUP_COUNT for backup count
2025-02-28 23:21:14 +08:00
yangdx
c973498c34
Fix linting
2025-02-28 21:35:04 +08:00
yangdx
c37b1e8aa7
Align Gunicorn configuration with Uvicorn
...
- centralize config in gunicorn_config.py
- fix log level handling in Gunicorn
2025-02-28 20:41:11 +08:00
yangdx
f588cdc5df
Optimize logging config & worker handling for different server modes
...
• Separate logging config for uvicorn/gunicorn
• Force workers=1 in uvicorn mode
• Add warning for worker count in uvicorn
2025-02-28 16:50:54 +08:00
yangdx
81f6f6e343
Fix lightrag logger initailization problem, fix gunicorn acccess log missing
2025-02-28 16:07:33 +08:00
yangdx
157ec862ae
Enhance logging system with file rotation and unified configuration
...
• Unify logging across Gunicorn and Uvicorn
• Add rotating file handlers
2025-02-28 14:57:25 +08:00
yangdx
8cd45161f2
feat: add history_messages to track pipeline processing progress
...
• Add shared history_messages list
• Track pipeline progress with messages
2025-02-28 13:53:40 +08:00
yangdx
b090a22be7
Add concurrency check for auto scan task to prevent duplicate scans
...
• Add pipeline status check before scan
• Add storage lock protection
• Add latest_message to status tracking
• Add helpful log message at startup
2025-02-28 12:22:20 +08:00
yangdx
04bd5413c9
Add API endpoint to retrieve document indexing pipeline status
...
• GET /pipeline_status endpoint added
• Returns current pipeline processing state
2025-02-28 12:21:50 +08:00
yangdx
b4bcd76599
Remove useless scan progress tracking functionality and related code
2025-02-28 10:53:36 +08:00
yangdx
db2a902fcb
Rename get_scan_lock to get_storage_lock
2025-02-28 00:34:33 +08:00
yangdx
64f22966a3
Fix linting
2025-02-27 19:05:51 +08:00
yangdx
92ecb0da97
Refactor document scanning progress share variable initialization
2025-02-27 16:07:00 +08:00
yangdx
03d05b094d
Improve Gunicorn support and cleanup shared storage initialization
...
• Move Gunicorn check before other startup
• Improve startup flow organization
2025-02-27 14:13:42 +08:00
yangdx
7aec78833c
Implement Gunicorn+Uvicorn integration for shared data preloading
...
- Create run_with_gunicorn.py script to properly initialize shared data in the
main process before forking worker processes
- Revert unvicorn to single process mode only, and let gunicorn do all the multi-process jobs
2025-02-27 13:25:22 +08:00
yangdx
7c237920b1
Refactor shared storage to support both single and multi-process modes
...
• Initialize storage based on worker count
• Remove redundant global variable checks
• Add explicit mutex initialization
• Centralize shared storage initialization
• Fix process/thread lock selection logic
2025-02-27 08:48:33 +08:00
yangdx
7436c06f6c
Fix linting
2025-02-26 18:11:16 +08:00
yangdx
4eb069d1d6
Initialize scan_progress with default values if not already set
2025-02-26 17:42:49 +08:00
yangdx
41f5d208a9
fix: shared data intitialization failed for multi-worker
2025-02-26 13:32:15 +08:00
yangdx
15a6a9cf7c
fix: log filtering void when uvicorn wokers is greater than 1
...
- Centralize logging setup
- Fix logger propagation issues
2025-02-26 12:23:35 +08:00
yangdx
2752a764ae
Refactor storage implementations to support both single and multi-process modes
...
• Add shared storage management module
• Support process/thread lock based on mode
2025-02-26 05:38:38 +08:00
ArnoChen
798c37d4fa
build webui
2025-02-25 18:36:34 +08:00
ArnoChen
40a1a94a31
add graph depth and layout iteration settings
2025-02-25 18:32:53 +08:00
yangdx
7262f61b0e
add redis configuration and update workers default value
2025-02-25 10:47:27 +08:00
yangdx
04fc5ce604
Remove unspported endpoint from splash mesages
2025-02-25 09:45:14 +08:00
yangdx
ddc366b672
Optimize display_splash_screen function
...
- Merge System Configuration into Server Configuration section
- Add Workers parameter display after Port parameter
2025-02-25 09:44:17 +08:00