Skip to content

Conversation

@xhuaustc
Copy link

@xhuaustc xhuaustc commented Dec 2, 2025

What problem does this PR solve?

Start RAGFlow with Uvicorn as an ASGI app by adding --use-uvicorn, and you can also set the number of workers with --uvicorn-workers.

Type of change

  • New Feature

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. 🌈 python Pull requests that update Python code 💞 feature Feature request, pull request that fullfill a new feature. labels Dec 2, 2025
@xhuaustc xhuaustc marked this pull request as draft December 2, 2025 01:39
@xhuaustc xhuaustc marked this pull request as ready for review December 2, 2025 01:39
@bucess
Copy link

bucess commented Dec 8, 2025

git clone https://github.com/xhuaustc/ragflow.git
cd ragflow
docker build -t ragflow:1 .

vi .env
......
RAGFLOW_IMAGE=ragflow:1
......

vi docker-compose.yml
......
command:
- --use-uvicorn
......

docker compose -f docker-compose.yml up

sgin up:
[email protected]
123456

sgin in:
[email protected]
123456
Login failed

logs:
cat ragflow-logs/data_sync_0.log
2025-12-08 14:23:12,550 INFO 47 data_sync_0 log path: /ragflow/logs/data_sync_0.log, log levels: {'peewee': 'WARNING', 'pdfminer': 'WARNING', 'root': 'INFO'}
2025-12-08 14:23:12,551 INFO 47


| __ \ | | / |
| | | | __ | | __ _ | (
_ _ _ __ ___
| | | |/ | __/ _ | _
| | | | '_ \ / |
| |
| | (| | || (| | ) | || | | | | (
|_____/ _
,|__,| |__/ _, || |_|_|
/ |
|
/

2025-12-08 14:23:12,551 INFO 47 RAGFlow version: b0d0559
2025-12-08 14:23:12,551 INFO 47 Current configs, from /ragflow/conf/service_conf.yaml:
ragflow: {'host': '0.0.0.0', 'http_port': 9380}
admin: {'host': '0.0.0.0', 'http_port': 9381}
mysql: {'name': 'rag_flow', 'user': 'root', 'password': '', 'host': 'mysql', 'port': 3306, 'max_connections': 900, 'stale_timeout': 300, 'max_allowed_packet': 1073741824}
minio: {'user': 'rag_flow', 'password': '
', 'host': 'minio:9000'}
es: {'hosts': 'http://es01:9200', 'username': 'elastic', 'password': ''}
os: {'hosts': 'http://opensearch01:9201', 'username': 'admin', 'password': '
'}
infinity: {'uri': 'infinity:23817', 'db_name': 'default_db'}
oceanbase: {'scheme': 'oceanbase', 'config': {'db_name': 'ragflow_doc', 'user': 'root@ragflow', 'password': 'infini_rag_flow', 'host': 'oceanbase', 'port': 2881}}
redis: {'db': 1, 'username': '', 'password': '********', 'host': 'redis:6379'}
user_default_llm: {'default_models': {'embedding_model': {'api_key': 'xxx', 'base_url': 'http://tei:80'}}}
2025-12-08 14:23:12,552 WARNING 47 SECURITY WARNING: Using auto-generated SECRET_KEY.
2025-12-08 14:23:12,552 INFO 47 Use Elasticsearch http://es01:9200 as the doc engine.
2025-12-08 14:23:12,613 INFO 47 GET http://es01:9200/ [status:200 duration:0.060s]
2025-12-08 14:23:12,616 INFO 47 HEAD http://es01:9200/ [status:200 duration:0.003s]
2025-12-08 14:23:12,616 INFO 47 Elasticsearch http://es01:9200 is healthy.
2025-12-08 14:23:12,618 WARNING 47 Load term.freq FAIL!
2025-12-08 14:23:12,620 WARNING 47 Realtime synonym is disabled, since no redis connection.
2025-12-08 14:23:12,792 WARNING 47 Load term.freq FAIL!
2025-12-08 14:23:12,795 WARNING 47 Realtime synonym is disabled, since no redis connection.
2025-12-08 14:23:12,798 WARNING 47 DB is not ready yet: (1146, "Table 'rag_flow.sync_logs' doesn't exist")
2025-12-08 14:23:15,803 WARNING 47 DB is not ready yet: (1146, "Table 'rag_flow.sync_logs' doesn't exist")
2025-12-08 14:23:18,807 WARNING 47 DB is not ready yet: (1146, "Table 'rag_flow.sync_logs' doesn't exist")
2025-12-08 14:23:21,813 WARNING 47 DB is not ready yet: (1146, "Table 'rag_flow.sync_logs' doesn't exist")
2025-12-08 14:23:24,818 WARNING 47 DB is not ready yet: (1146, "Table 'rag_flow.sync_logs' doesn't exist")
2025-12-08 14:23:27,822 WARNING 47 DB is not ready yet: (1146, "Table 'rag_flow.sync_logs' doesn't exist")

cat ragflow-logs/ragflow_server.log
2025-12-08 14:23:25,413 INFO 53 ragflow_server log path: /ragflow/logs/ragflow_server.log, log levels: {'peewee': 'WARNING', 'pdfminer': 'WARNING', 'root': 'INFO'}
2025-12-08 14:23:25,413 INFO 53
____ ___ ______ ______ __
/ __ \ / | / // // / _ __
/ /
/ // /| | / / __ / /
/ // __ | | /| / /
/ , // ___ |/ // // __/ / // // /| |/ |/ /
/
/ |
|// ||_/// // _/ |/|__/

2025-12-08 14:23:25,413 INFO 53 RAGFlow version: b0d0559
2025-12-08 14:23:25,413 INFO 53 project base: /ragflow
2025-12-08 14:23:25,413 INFO 53 Current configs, from /ragflow/conf/service_conf.yaml:
ragflow: {'host': '0.0.0.0', 'http_port': 9380}
admin: {'host': '0.0.0.0', 'http_port': 9381}
mysql: {'name': 'rag_flow', 'user': 'root', 'password': '', 'host': 'mysql', 'port': 3306, 'max_connections': 900, 'stale_timeout': 300, 'max_allowed_packet': 1073741824}
minio: {'user': 'rag_flow', 'password': '
', 'host': 'minio:9000'}
es: {'hosts': 'http://es01:9200', 'username': 'elastic', 'password': ''}
os: {'hosts': 'http://opensearch01:9201', 'username': 'admin', 'password': '
'}
infinity: {'uri': 'infinity:23817', 'db_name': 'default_db'}
oceanbase: {'scheme': 'oceanbase', 'config': {'db_name': 'ragflow_doc', 'user': 'root@ragflow', 'password': 'infini_rag_flow', 'host': 'oceanbase', 'port': 2881}}
redis: {'db': 1, 'username': '', 'password': '********', 'host': 'redis:6379'}
user_default_llm: {'default_models': {'embedding_model': {'api_key': 'xxx', 'base_url': 'http://tei:80'}}}
2025-12-08 14:23:25,414 WARNING 53 SECURITY WARNING: Using auto-generated SECRET_KEY.
2025-12-08 14:23:25,415 WARNING 53 Load term.freq FAIL!
2025-12-08 14:23:25,417 WARNING 53 Realtime synonym is disabled, since no redis connection.
2025-12-08 14:23:25,419 WARNING 53 Load term.freq FAIL!
2025-12-08 14:23:25,421 WARNING 53 Realtime synonym is disabled, since no redis connection.
2025-12-08 14:23:25,421 INFO 53 MAX_CONTENT_LENGTH: 134217728
2025-12-08 14:23:25,421 INFO 53 MAX_FILE_COUNT_PER_USER: 0
2025-12-08 14:23:25,469 INFO 54 ragflow_server log path: /ragflow/logs/ragflow_server.log, log levels: {'peewee': 'WARNING', 'pdfminer': 'WARNING', 'root': 'INFO'}
2025-12-08 14:23:25,469 INFO 54
____ ___ ______ ______ __
/ __ \ / | / // // / _ __
/ /
/ // /| | / / __ / /
/ // __ | | /| / /
/ , // ___ |/ // // __/ / // // /| |/ |/ /
/
/ |
|// ||_/// // _/ |/|__/

2025-12-08 14:23:25,469 INFO 54 RAGFlow version: b0d0559
2025-12-08 14:23:25,469 INFO 54 project base: /ragflow
2025-12-08 14:23:25,469 INFO 54 Current configs, from /ragflow/conf/service_conf.yaml:
ragflow: {'host': '0.0.0.0', 'http_port': 9380}
admin: {'host': '0.0.0.0', 'http_port': 9381}
mysql: {'name': 'rag_flow', 'user': 'root', 'password': '', 'host': 'mysql', 'port': 3306, 'max_connections': 900, 'stale_timeout': 300, 'max_allowed_packet': 1073741824}
minio: {'user': 'rag_flow', 'password': '
', 'host': 'minio:9000'}
es: {'hosts': 'http://es01:9200', 'username': 'elastic', 'password': ''}
os: {'hosts': 'http://opensearch01:9201', 'username': 'admin', 'password': '
'}
infinity: {'uri': 'infinity:23817', 'db_name': 'default_db'}
oceanbase: {'scheme': 'oceanbase', 'config': {'db_name': 'ragflow_doc', 'user': 'root@ragflow', 'password': 'infini_rag_flow', 'host': 'oceanbase', 'port': 2881}}
redis: {'db': 1, 'username': '', 'password': '********', 'host': 'redis:6379'}
user_default_llm: {'default_models': {'embedding_model': {'api_key': 'xxx', 'base_url': 'http://tei:80'}}}
2025-12-08 14:23:25,470 WARNING 54 SECURITY WARNING: Using auto-generated SECRET_KEY.
2025-12-08 14:23:25,471 WARNING 54 Load term.freq FAIL!
2025-12-08 14:23:25,474 WARNING 54 Realtime synonym is disabled, since no redis connection.
2025-12-08 14:23:25,475 WARNING 54 Load term.freq FAIL!
2025-12-08 14:23:25,477 WARNING 54 Realtime synonym is disabled, since no redis connection.
2025-12-08 14:23:25,478 INFO 54 MAX_CONTENT_LENGTH: 134217728
2025-12-08 14:23:25,478 INFO 54 MAX_FILE_COUNT_PER_USER: 0
2025-12-08 14:23:38,488 INFO 54 init web data success:5.271185636520386
2025-12-08 14:23:38,488 INFO 54 Recursively importing plugins from path /ragflow/plugin/embedded_plugins
2025-12-08 14:23:38,490 INFO 54 Loaded llm_tools plugin BadCalculatorPlugin version 1.0.0
2025-12-08 14:23:38,490 INFO 54 Starting background tasks (update_progress)...
2025-12-08 14:23:38,491 INFO 54 update_progress lock_value: 7fc1d233-3884-45ea-9e78-79a272b415cb
2025-12-08 14:23:38,507 INFO 53 init web data success:5.750194787979126
2025-12-08 14:23:38,507 INFO 53 Recursively importing plugins from path /ragflow/plugin/embedded_plugins
2025-12-08 14:23:38,509 INFO 53 Loaded llm_tools plugin BadCalculatorPlugin version 1.0.0
2025-12-08 14:23:38,509 INFO 53 Starting background tasks (update_progress)...
2025-12-08 14:23:38,510 INFO 53 update_progress lock_value: bda39a62-d718-496c-aa93-f8c2fb6de36b
2025-12-08 14:23:54,880 WARNING 54 load_user got exception Signature b'iPqEjn9UonL6CAh5OWXytFADYZo' does not match
2025-12-08 14:23:54,881 ERROR 54 Unhandled exception during request
Traceback (most recent call last):
File "/ragflow/.venv/lib/python3.10/site-packages/quart/app.py", line 1500, in full_dispatch_request
result = await self.dispatch_request(request_context)
File "/ragflow/.venv/lib/python3.10/site-packages/quart/app.py", line 1597, in dispatch_request
return await self.ensure_async(handler)(**request_.view_args) # type: ignore[return-value]
File "/ragflow/api/apps/init.py", line 170, in wrapper
raise Unauthorized()
quart_auth.extension.Unauthorized: 401 Unauthorized: The server could not verify that you are authorized to access the URL requested. You either supplied the wrong credentials (e.g. a bad password), or your browser doesn't understand how to supply the credentials required.
2025-12-08 14:23:54,884 WARNING 54 load_user got exception Signature b'iPqEjn9UonL6CAh5OWXytFADYZo' does not match
2025-12-08 14:23:54,885 WARNING 54 load_user got exception Signature b'iPqEjn9UonL6CAh5OWXytFADYZo' does not match
2025-12-08 14:23:54,885 ERROR 54 Unhandled exception during request
Traceback (most recent call last):
File "/ragflow/.venv/lib/python3.10/site-packages/quart/app.py", line 1500, in full_dispatch_request
result = await self.dispatch_request(request_context)
File "/ragflow/.venv/lib/python3.10/site-packages/quart/app.py", line 1597, in dispatch_request
return await self.ensure_async(handler)(**request_.view_args) # type: ignore[return-value]
File "/ragflow/api/apps/init.py", line 170, in wrapper
raise Unauthorized()
quart_auth.extension.Unauthorized: 401 Unauthorized: The server could not verify that you are authorized to access the URL requested. You either supplied the wrong credentials (e.g. a bad password), or your browser doesn't understand how to supply the credentials required.
2025-12-08 14:23:54,885 ERROR 54 Unhandled exception during request
Traceback (most recent call last):
File "/ragflow/.venv/lib/python3.10/site-packages/quart/app.py", line 1500, in full_dispatch_request
result = await self.dispatch_request(request_context)
File "/ragflow/.venv/lib/python3.10/site-packages/quart/app.py", line 1597, in dispatch_request
return await self.ensure_async(handler)(**request_.view_args) # type: ignore[return-value]
File "/ragflow/api/apps/init.py", line 170, in wrapper
raise Unauthorized()
quart_auth.extension.Unauthorized: 401 Unauthorized: The server could not verify that you are authorized to access the URL requested. You either supplied the wrong credentials (e.g. a bad password), or your browser doesn't understand how to supply the credentials required.

cat ragflow-logs/task_executor_4db2ea2eb5ac_0.log
2025-12-08 14:23:23,543 INFO 50 task_executor_4db2ea2eb5ac_0 log path: /ragflow/logs/task_executor_4db2ea2eb5ac_0.log, log levels: {'peewee': 'WARNING', 'pdfminer': 'WARNING', 'root': 'INFO'}
2025-12-08 14:23:23,543 INFO 50
____ __ _
/ /__ ____ ____ / /() ____ ________ ______ _____ _____
/ // __ / __ `/ _ / / __/ / __ / __ \ / / _ / / | / / _ / /
/ // / / / // / ( ) /
/ / /
/ / / / / (
) _/ / | |/ / / /
/
/
/ /
/_
, /_/
/_//_
// // //___// |/___//
/
___/

2025-12-08 14:23:23,544 INFO 50 RAGFlow version: b0d0559
2025-12-08 14:23:23,544 INFO 50 Current configs, from /ragflow/conf/service_conf.yaml:
ragflow: {'host': '0.0.0.0', 'http_port': 9380}
admin: {'host': '0.0.0.0', 'http_port': 9381}
mysql: {'name': 'rag_flow', 'user': 'root', 'password': '', 'host': 'mysql', 'port': 3306, 'max_connections': 900, 'stale_timeout': 300, 'max_allowed_packet': 1073741824}
minio: {'user': 'rag_flow', 'password': '
', 'host': 'minio:9000'}
es: {'hosts': 'http://es01:9200', 'username': 'elastic', 'password': ''}
os: {'hosts': 'http://opensearch01:9201', 'username': 'admin', 'password': '
'}
infinity: {'uri': 'infinity:23817', 'db_name': 'default_db'}
oceanbase: {'scheme': 'oceanbase', 'config': {'db_name': 'ragflow_doc', 'user': 'root@ragflow', 'password': 'infini_rag_flow', 'host': 'oceanbase', 'port': 2881}}
redis: {'db': 1, 'username': '', 'password': '********', 'host': 'redis:6379'}
user_default_llm: {'default_models': {'embedding_model': {'api_key': 'xxx', 'base_url': 'http://tei:80'}}}
2025-12-08 14:23:23,544 WARNING 50 SECURITY WARNING: Using auto-generated SECRET_KEY.
2025-12-08 14:23:23,544 INFO 50 Use Elasticsearch http://es01:9200 as the doc engine.
2025-12-08 14:23:23,552 INFO 50 GET http://es01:9200/ [status:200 duration:0.006s]
2025-12-08 14:23:23,554 INFO 50 HEAD http://es01:9200/ [status:200 duration:0.002s]
2025-12-08 14:23:23,555 INFO 50 Elasticsearch http://es01:9200 is healthy.
2025-12-08 14:23:23,556 WARNING 50 Load term.freq FAIL!
2025-12-08 14:23:23,558 WARNING 50 Realtime synonym is disabled, since no redis connection.
2025-12-08 14:23:23,562 WARNING 50 Load term.freq FAIL!
2025-12-08 14:23:23,565 WARNING 50 Realtime synonym is disabled, since no redis connection.
2025-12-08 14:23:23,565 INFO 50 can't import package 'torch'
2025-12-08 14:23:23,565 INFO 50 settings.EMBEDDING_CFG: {'model': '', 'factory': '', 'api_key': 'xxx', 'base_url': 'http://tei:80'}
2025-12-08 14:23:23,565 INFO 50 MAX_CONTENT_LENGTH: 134217728
2025-12-08 14:23:23,565 INFO 50 MAX_FILE_COUNT_PER_USER: 0
2025-12-08 14:23:23,567 WARNING 50 RedisDB.queue_info rag_flow_svr_queue got exception: no such key
2025-12-08 14:23:23,568 WARNING 50 RedisDB.queue_info rag_flow_svr_queue got exception: no such key
2025-12-08 14:23:23,569 WARNING 50 RedisDB.queue_info rag_flow_svr_queue got exception: no such key
2025-12-08 14:23:23,569 INFO 50 task_executor_4db2ea2eb5ac_0 reported heartbeat: {"ip_address": "172.21.0.6", "pid": 50, "name": "task_executor_4db2ea2eb5ac_0", "now": "2025-12-08T14:23:23.567+08:00", "boot_at": "2025-12-08T14:23:23.542+08:00", "pending": 0, "lag": 0, "done": 0, "failed": 0, "current": {}}
2025-12-08 14:23:23,570 WARNING 50 RedisDB.get_unacked_iterator queue rag_flow_svr_queue_1 doesn't exist
2025-12-08 14:23:23,570 WARNING 50 RedisDB.get_unacked_iterator queue rag_flow_svr_queue doesn't exist
2025-12-08 14:23:53,574 INFO 50 task_executor_4db2ea2eb5ac_0 reported heartbeat: {"ip_address": "172.21.0.6", "pid": 50, "name": "task_executor_4db2ea2eb5ac_0", "now": "2025-12-08T14:23:53.574+08:00", "boot_at": "2025-12-08T14:23:23.542+08:00", "pending": 0, "lag": 0, "done": 0, "failed": 0, "current": {}}
2025-12-08 14:24:23,580 INFO 50 task_executor_4db2ea2eb5ac_0 reported heartbeat: {"ip_address": "172.21.0.6", "pid": 50, "name": "task_executor_4db2ea2eb5ac_0", "now": "2025-12-08T14:24:23.579+08:00", "boot_at": "2025-12-08T14:23:23.542+08:00", "pending": 0, "lag": 0, "done": 0, "failed": 0, "current": {}}
2025-12-08 14:24:53,583 INFO 50 task_executor_4db2ea2eb5ac_0 reported heartbeat: {"ip_address": "172.21.0.6", "pid": 50, "name": "task_executor_4db2ea2eb5ac_0", "now": "2025-12-08T14:24:53.583+08:00", "boot_at": "2025-12-08T14:23:23.542+08:00", "pending": 0, "lag": 0, "done": 0, "failed": 0, "current": {}}
2025-12-08 14:25:23,587 INFO 50 task_executor_4db2ea2eb5ac_0 reported heartbeat: {"ip_address": "172.21.0.6", "pid": 50, "name": "task_executor_4db2ea2eb5ac_0", "now": "2025-12-08T14:25:23.587+08:00", "boot_at": "2025-12-08T14:23:23.542+08:00", "pending": 0, "lag": 0, "done": 0, "failed": 0, "current": {}}
2025-12-08 14:25:53,592 INFO 50 task_executor_4db2ea2eb5ac_0 reported heartbeat: {"ip_address": "172.21.0.6", "pid": 50, "name": "task_executor_4db2ea2eb5ac_0", "now": "2025-12-08T14:25:53.591+08:00", "boot_at": "2025-12-08T14:23:23.542+08:00", "pending": 0, "lag": 0, "done": 0, "failed": 0, "current": {}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💞 feature Feature request, pull request that fullfill a new feature. 🌈 python Pull requests that update Python code size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants