Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] 线程池的线程数始终在5,无法提高线程池中的线程数,导致并发Internet Error #5034

Open
a2382625920 opened this issue Oct 28, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@a2382625920
Copy link

问题描述 / Problem Description
在进行知识库向量化操作时,线程池的线程数无论怎么调整,在进行并发处理时,最高只有5

复现问题的步骤 / Steps to Reproduce
INFO: 127.0.0.1:51872 - "POST /knowledge_base/upload_docs HTTP/1.1" 200 OK
2024-10-25 17:43:55.958 | INFO | chatchat.server.knowledge_base.kb_cache.faiss_cache:save:40 - 已将向量库 ('ceshi-001', 'bge-large-zh-v1.5') 保存到磁盘
INFO: 127.0.0.1:51806 - "POST /knowledge_base/upload_docs HTTP/1.1" 200 OK
2024-10-25 17:43:55.961 | INFO | chatchat.server.knowledge_base.kb_cache.faiss_cache:save:40 - 已将向量库 ('ceshi-001', 'bge-large-zh-v1.5') 保存到磁盘
INFO: 127.0.0.1:51804 - "POST /knowledge_base/upload_docs HTTP/1.1" 200 OK
当前线程池中的线程数: 1
当前线程池中的线程数: 2
当前线程池中的线程数: 3
当前线程池中的线程数: 4
当前线程池中的线程数: 5
2024-10-25 17:43:56,027 httpx 120694 INFO HTTP Request: POST http://127.0.0.1:9997/v1/embeddings "HTTP/1.1 200 OK"
当前活跃的线程数: 47
2024-10-25 17:43:56,062 httpx 120694 INFO HTTP Request: POST http://127.0.0.1:9997/v1/embeddings "HTTP/1.1 200 OK"
当前活跃的线程数: 47
2024-10-25 17:43:56,096 httpx 120694 INFO HTTP Request: POST http://127.0.0.1:9997/v1/embeddings "HTTP/1.1 200 OK"
当前活跃的线程数: 47
2024-10-25 17:43:56,130 httpx 120694 INFO HTTP Request: POST http://127.0.0.1:9997/v1/embeddings "HTTP/1.1 200 OK"
当前活跃的线程数: 47
2024-10-25 17:43:56,150 httpx 120694 INFO HTTP Request: POST http://127.0.0.1:9997/v1/embeddings "HTTP/1.1 200 OK"
当前活跃的线程数: 47
当前活跃的线程数: 42

预期的结果 / Expected Result
希望可以根据自己CPU核心数来进行线程数的调整,保证并发的顺利进行

实际结果 / Actual Result
并发过程中会有操作500 Internet Error的情况发生

环境信息 / Environment Information

  • Langchain-Chatchat 版本 / commit 号:0.3.1.2
  • 部署方式(pypi 安装 / 源码部署 / docker 部署):pypi 安装
  • 使用的模型推理框架(Xinference / Ollama / OpenAI API 等):Xinference / Model serve method
  • 使用的 LLM 模型(GLM-4-9B / Qwen2-7B-Instruct 等):Qwen2.5-Instruct
  • 使用的 Embedding 模型(bge-large-zh-v1.5 / m3e-base 等):bge-large-zh-v1.5
  • 使用的向量库类型 (faiss / milvus / pg_vector 等): faiss
  • Python 版本 / Python version: 3.10
  • 推理使用的硬件(GPU / CPU / MPS / NPU 等) / Inference hardware (GPU / CPU / MPS / NPU, etc.): GPU
  • 其他相关环境信息 / Other relevant environment information:

附加信息 / Additional Information
添加与问题相关的任何其他信息 / Add any other information related to the issue.

@a2382625920 a2382625920 added the bug Something isn't working label Oct 28, 2024
@a2382625920
Copy link
Author

版本号是0.3.1.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant