Help #31267
Replies: 1 comment 6 replies
-
|
This is a known issue in Dify: when you delete a knowledge base while documents are still being parsed, the related document parsing tasks remain in the tenant-isolated Redis queue. These orphaned tasks block the queue, so any new uploads to new knowledge bases get stuck in the "Queued" state. Restarting Dify doesn't help because the tasks persist in Redis and will only be cleared as workers attempt to process them—if the dataset no longer exists, the task just logs "Dataset is not found" and exits, but the queue slot remains blocked until all such tasks are consumed. There is currently no built-in admin tool or documented workaround to manually clear these stuck tasks or reset the queue for deleted knowledge bases. For advanced users, you could consider manually clearing the relevant Redis keys for your tenant's document indexing queue, but this should be done with caution and only if you are comfortable with Redis and understand the risks (such as potentially affecting other queued tasks). It would be beneficial for maintainers to add a cleanup mechanism that removes orphaned tasks from the queue when a knowledge base is deleted to prevent this issue in the future. If you need more technical details or guidance on identifying the Redis keys, let me know and I can provide more specifics. Reference: code analysis and queue management To reply, just mention @dosu. Share context across your team and agents. Try Dosu. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Self Checks
1. Is this request related to a challenge you're experiencing? Tell me about your story.
I uploaded a large number of documents to a knowledge base in Dify. Before the documents finished parsing, I deleted the knowledge base.
After that, I created a new knowledge base and tried to upload documents again. However, all newly uploaded documents remain stuck in the “Queued” state. It seems that the documents from the previously deleted knowledge base are still being parsed in the background.
I have tried restarting Dify, but the issue persists and the queue does not move forward.
Expected behavior
After deleting a knowledge base, all related document parsing tasks should be canceled or cleaned up. New knowledge bases should be able to process documents normally.
Actual behavior
Document parsing tasks appear to remain in the queue even after the knowledge base is deleted, blocking new uploads.
Additional context
The issue occurred when the original documents were still being parsed.
Restarting the Dify service did not resolve the problem.
2. Additional context or comments
No response
Beta Was this translation helpful? Give feedback.
All reactions