Knowledge base indexing causes service lag #5968

Closed
opened 2026-02-21 18:13:27 -05:00 by yindo · 2 comments
Owner

Originally created by @starweavingdream on GitHub (Oct 9, 2024).

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

0.8.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When uploading too many large files to the knowledge base for indexing, the entire service will be slow, causing the question-and-answer service to be unavailable.

✔️ Expected Behavior

I expect the API service and worker service to run on two machines, but I don't know if this is possible, or if the API service can be used normally when indexing the knowledge base.

Actual Behavior

No response

Originally created by @starweavingdream on GitHub (Oct 9, 2024). ### 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 0.8.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce When uploading too many large files to the knowledge base for indexing, the entire service will be slow, causing the question-and-answer service to be unavailable. ### ✔️ Expected Behavior I expect the API service and worker service to run on two machines, but I don't know if this is possible, or if the API service can be used normally when indexing the knowledge base. ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug🤔 cant-reproduce labels 2026-02-21 18:13:27 -05:00
yindo closed this issue 2026-02-21 18:13:27 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Oct 9, 2024):

Running the API and worker services on separate machines is possible in Dify version 0.8.3. You can configure the docker-compose.yaml file to define separate services for the API and worker, and deploy them on different machines. This setup can help alleviate service lag during knowledge base indexing by distributing the workload.

Ensure that both machines have network connectivity, especially for shared dependencies like the database and Redis. This configuration allows each service to operate independently while maintaining necessary connections [1][2].

For more details, you might want to check similar discussions, such as the one about handling large numbers of files in the knowledge base [3].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Oct 9, 2024): <!-- Answer --> Running the API and worker services on separate machines is possible in Dify version 0.8.3. You can configure the `docker-compose.yaml` file to define separate services for the API and worker, and deploy them on different machines. This setup can help alleviate service lag during knowledge base indexing by distributing the workload. Ensure that both machines have network connectivity, especially for shared dependencies like the database and Redis. This configuration allows each service to operate independently while maintaining necessary connections <sup>[[1]](https://github.com/langgenius/dify/blob/main/docker/docker-compose.yaml)</sup><sup>[[2]](https://github.com/langgenius/dify/blob/main/docker-legacy/docker-compose.yaml)</sup>. For more details, you might want to check similar discussions, such as the one about handling large numbers of files in the knowledge base <sup>[[3]](https://github.com/langgenius/dify/discussions/8448)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@crazywoola commented on GitHub (Oct 9, 2024):

Duplicated, see for details. https://github.com/langgenius/dify/issues/7677

@crazywoola commented on GitHub (Oct 9, 2024): Duplicated, see for details. https://github.com/langgenius/dify/issues/7677
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5968