There is an error when uploading multiple attachments to the knowledge base #10202

Closed
opened 2026-02-21 18:44:02 -05:00 by yindo · 0 comments
Owner

Originally created by @cditqq on GitHub (Mar 10, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I encountered an error while uploading multiple attachments in bulk, stating that a new thread cannot be created. However, I did not find this issue during testing on version 0.15.3. The error message is as follows:
can't start new thread

Image

Image

error logs:
2025-03-10 12:57:08.649 ERROR [Dummy-3] [indexing_runner.py:96] - consume document failed Traceback (most recent call last): File "/app/api/core/indexing_runner.py", line 73, in run documents = self._transform( ^^^^^^^^^^^^^^^^ File "/app/api/core/indexing_runner.py", line 706, in _transform documents = index_processor.transform( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/index_processor/processor/paragraph_index_processor.py", line 58, in transform document_nodes = splitter.split_documents([document]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/splitter/text_splitter.py", line 96, in split_documents return self.create_documents(texts, metadatas=metadatas) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/splitter/text_splitter.py", line 81, in create_documents for chunk in self.split_text(text): ^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/splitter/fixed_text_splitter.py", line 68, in split_text chunks_lengths = self._length_function(chunks) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/splitter/fixed_text_splitter.py", line 38, in _token_encoder return embedding_model_instance.get_text_embedding_num_tokens(texts=texts) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/model_manager.py", line 244, in get_text_embedding_num_tokens self._round_robin_invoke( File "/app/api/core/model_manager.py", line 370, in _round_robin_invoke return function(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/model_runtime/model_providers/__base/text_embedding_model.py", line 65, in get_num_tokens return plugin_model_manager.get_text_embedding_num_tokens( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/plugin/manager/model.py", line 313, in get_text_embedding_num_tokens for resp in response: ^^^^^^^^ File "/app/api/core/plugin/manager/base.py", line 189, in _request_with_plugin_daemon_response_stream self._handle_plugin_daemon_error(error.error_type, error.message) File "/app/api/core/plugin/manager/base.py", line 221, in _handle_plugin_daemon_error raise PluginInvokeError(description=message) core.plugin.manager.exc.PluginInvokeError: PluginInvokeError: {"args":{},"error_type":"RuntimeError","message":"can't start new thread"}

✔️ Expected Behavior

Upload knowledge base content correctly

Actual Behavior

Trying to retry after reporting an error cannot solve the problem, and all services must be restarted to continue. However, when there are many attachments, it is necessary to continuously restart to resolve the issue. Expecting a new solution

Originally created by @cditqq on GitHub (Mar 10, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce I encountered an error while uploading multiple attachments in bulk, stating that a new thread cannot be created. However, I did not find this issue during testing on version 0.15.3. The error message is as follows: **can't start new thread** ![Image](https://github.com/user-attachments/assets/ae84b4a2-1ccd-4e32-b8be-49da0664ab85) ![Image](https://github.com/user-attachments/assets/6937a967-e0d1-42c2-85c7-6cda5ed704d7) **error logs:** ` 2025-03-10 12:57:08.649 ERROR [Dummy-3] [indexing_runner.py:96] - consume document failed Traceback (most recent call last): File "/app/api/core/indexing_runner.py", line 73, in run documents = self._transform( ^^^^^^^^^^^^^^^^ File "/app/api/core/indexing_runner.py", line 706, in _transform documents = index_processor.transform( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/index_processor/processor/paragraph_index_processor.py", line 58, in transform document_nodes = splitter.split_documents([document]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/splitter/text_splitter.py", line 96, in split_documents return self.create_documents(texts, metadatas=metadatas) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/splitter/text_splitter.py", line 81, in create_documents for chunk in self.split_text(text): ^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/splitter/fixed_text_splitter.py", line 68, in split_text chunks_lengths = self._length_function(chunks) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/rag/splitter/fixed_text_splitter.py", line 38, in _token_encoder return embedding_model_instance.get_text_embedding_num_tokens(texts=texts) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/model_manager.py", line 244, in get_text_embedding_num_tokens self._round_robin_invoke( File "/app/api/core/model_manager.py", line 370, in _round_robin_invoke return function(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/model_runtime/model_providers/__base/text_embedding_model.py", line 65, in get_num_tokens return plugin_model_manager.get_text_embedding_num_tokens( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/plugin/manager/model.py", line 313, in get_text_embedding_num_tokens for resp in response: ^^^^^^^^ File "/app/api/core/plugin/manager/base.py", line 189, in _request_with_plugin_daemon_response_stream self._handle_plugin_daemon_error(error.error_type, error.message) File "/app/api/core/plugin/manager/base.py", line 221, in _handle_plugin_daemon_error raise PluginInvokeError(description=message) core.plugin.manager.exc.PluginInvokeError: PluginInvokeError: {"args":{},"error_type":"RuntimeError","message":"can't start new thread"} ` ### ✔️ Expected Behavior Upload knowledge base content correctly ### ❌ Actual Behavior Trying to retry after reporting an error cannot solve the problem, and all services must be restarted to continue. However, when there are many attachments, it is necessary to continuously restart to resolve the issue. Expecting a new solution
yindo closed this issue 2026-02-21 18:44:02 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#10202