Commit Graph

2199 Commits

Author SHA1 Message Date
zrguo
1611400854 fix demo 2025-03-03 18:33:42 +08:00
zrguo
887388c317 fix linting 2025-03-03 14:54:28 +08:00
zrguo
0320aa4ccc Merge pull request #971 from Volve-Technologies/abyl/adding_full_doc_id
adding full_doc_id to insert
2025-03-03 14:44:50 +08:00
Yannick Stephan
2d6d0be128 Merge pull request #969 from danielaskdd/add-multi-worker-support
Add multi workers support for API Server
2025-03-02 17:47:00 +01:00
yangdx
12fbc5b851 Updated env.example with better documentation and clarity
- Renamed file from .env.example to env.example
2025-03-02 19:12:11 +08:00
yangdx
fca6969b0b Update Gunicorn startup instructions in API documentation 2025-03-02 18:33:18 +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
zrguo
265fc2c87f fix linting 2025-03-02 14:24:54 +08:00
zrguo
5198240cf9 remove " and upper() 2025-03-02 14:23:06 +08:00
yangdx
396b8c3347 Add psutil to required dependencies for runtime monitoring 2025-03-02 12:44:58 +08:00
yangdx
7124845e55 Optimize document processing pipeline with better status tracking & batch handling
• Add upfront doc processing check
• Optimize pipeline status updates
2025-03-02 11:09:32 +08:00
yangdx
1a5eb20003 Fix history_messages clearing in LightRAG pipeline status initialization 2025-03-02 04:43:41 +08:00
yangdx
c0b22a8ae2 Merge branch 'main' into add-multi-worker-support 2025-03-02 02:54:57 +08:00
yangdx
e20aeada92 docs: add gunicorn deployment guide and update server 2025-03-02 02:43:11 +08:00
yangdx
8fb3670ac7 Add additional log-related patterns to gitignore 2025-03-02 02:26:21 +08:00
yangdx
7cd25fe5ab Improve shared storage cleanup and clarify initialization in multi-worker setup 2025-03-02 01:00:27 +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
9aef112d51 Fix incorrect comment about update flag behavior in FAISS implementation 2025-03-01 22:27:12 +08:00
Abyl Ikhsanov
bf0ddc6450 making optional for ainsert 2025-03-01 13:34:49 +01:00
Abyl Ikhsanov
baa505eeb0 adding full_doc_id to insert 2025-03-01 13:26:02 +01:00
zrguo
9aa438cf79 fix linting 2025-03-01 18:35:12 +08:00
zrguo
a8f4385c05 Add clear_cache 2025-03-01 18:30:58 +08:00
zrguo
a923ee89b0 Update __init__.py 2025-03-01 17:47:53 +08:00
zrguo
4219454fab fix format 2025-03-01 17:45:06 +08:00
yangdx
e3a40c2fdb Fix linting 2025-03-01 16:23:34 +08:00
yangdx
3507e894d9 Merge branch 'main' into add-multi-worker-support 2025-03-01 15:55:37 +08:00
yangdx
d18eb52ccc Add type ignore comments for asyncpg imports to suppress mypy errors 2025-03-01 15:38:39 +08:00
yangdx
3511b9805c Add auto-installation of gunicorn if not present in environment 2025-03-01 15:34:01 +08:00
yangdx
ab704aae47 Config log setting for very woker properly for Gunicorn mode. 2025-03-01 15:13:21 +08:00
yangdx
40e9e26edb feat: add update flags status to API health endpoint 2025-03-01 14:58:26 +08:00
yangdx
41eff2ca2f Fix data persistence issue in NanoVectorDBStorage 2025-03-01 13:35:00 +08:00
yangdx
48d9800573 Enhance gunicorn config handling with env vars and command line arg priority
• Add env var support for timeout/keepalive
• Prioritize CLI args over env vars
• Standardize default timeout to 150s
2025-03-01 12:58:52 +08:00
yangdx
35bcfca28f feat: add multi-process support for FAISS vector storage
• Add storage update flag and locks
• Support cross-process index reload
• Add async initialize method
2025-03-01 12:42:30 +08:00
yangdx
d4f6dcfd54 Improve multi-process data synchronization and persistence in storage implementations
• Remove _get_client() or _get_graph() from index_done_callback
• Add return value for index_done_callback
2025-03-01 12:41:30 +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
d3de57c1e4 Add multi-process support for vector database and graph storage with lock flags
• Implement storage lock mechanism
• Add update flag handling
• Add cross-process reload detection
2025-03-01 10:37:05 +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
Yannick Stephan
5bbe61a02d Merge pull request #960 from FeHuynhVI/fix-delete-by-doc-id
feat: fix delete by document id
2025-02-28 19:44:05 +01: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
a721421bd8 Add async support and update flag mechanism for shared storage
• Use asyncio.Lock  instead of thread lock for single process mode
• Add storage update notification system
2025-03-01 01:49:26 +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
731d820bcc Remove redundancy set_logger function and related calls 2025-02-28 21:46:45 +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
ff549a3a9c Update Gunicorn config with logging filters and worker-specific configurations 2025-02-28 17:45:40 +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