knowledge retrieve Queuing #21206

Closed
opened 2026-02-21 20:11:26 -05:00 by yindo · 2 comments
Owner

Originally created by @BrianXu001 on GitHub (Dec 22, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • 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, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.11.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

1、load a big file;
2、delete it;
3、load a new file

✔️ Expected Behavior

It should indexing the new file immediately, but the file was Queuing all the time.

Actual Behavior

No response

Originally created by @BrianXu001 on GitHub (Dec 22, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [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, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.11.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1、load a big file; 2、delete it; 3、load a new file ### ✔️ Expected Behavior It should indexing the new file immediately, but the file was Queuing all the time. ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug🤔 cant-reproduce labels 2026-02-21 20:11:26 -05:00
yindo closed this issue 2026-02-21 20:11:26 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 22, 2025):

This queuing issue is a known behavior in self-hosted Dify (Docker) when uploading, deleting, and re-uploading large files. The root cause is the Redis-backed tenant queue system: if you delete a file while its indexing job is still running, the queue key remains active, so any new uploads are enqueued and stay in "Queuing" until the previous job finishes or the queue TTL expires. This is by design to avoid concurrent indexing conflicts, but it can leave new files stuck if the previous job is slow or interrupted (details).

To resolve or prevent this:

  • Make sure your Celery worker is running and listening on all required queues, especially priority_dataset, priority_pipeline, and pipeline. Update your docker-compose.yaml to include these queues and restart the worker (example, example config).
  • Check that all services (Celery, Redis, vector store, database) are healthy and your .env has DEBUG=false and FLASH_DEBUG=false (troubleshooting).
  • If a file is stuck in "Queuing" after deleting a previous large file, you can clear the queue by restarting the Celery worker (docker compose restart worker) or, for advanced users, by manually deleting the relevant Redis keys (this will remove all pending tasks and may require re-uploading documents) (manual queue clearing).
  • If the problem persists, check worker logs for errors and confirm your vector store is not in read-only mode and has enough resources (docs issue).

This queuing logic is intentional to ensure safe, sequential processing, but can be improved in future releases. For now, worker restarts and queue checks are the main workarounds.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Dec 22, 2025): <!-- Answer --> This queuing issue is a known behavior in self-hosted Dify (Docker) when uploading, deleting, and re-uploading large files. The root cause is the Redis-backed tenant queue system: if you delete a file while its indexing job is still running, the queue key remains active, so any new uploads are enqueued and stay in "Queuing" until the previous job finishes or the queue TTL expires. This is by design to avoid concurrent indexing conflicts, but it can leave new files stuck if the previous job is slow or interrupted ([details](https://github.com/langgenius/dify/blob/eabdc5f0ebd806ede0c8f8695d54efb24e61748b/api/core/rag/pipeline/queue.py#L23-L83)). To resolve or prevent this: - Make sure your Celery worker is running and listening on all required queues, especially `priority_dataset`, `priority_pipeline`, and `pipeline`. Update your `docker-compose.yaml` to include these queues and restart the worker ([example](https://github.com/langgenius/dify/issues/28513), [example config](https://github.com/langgenius/dify/discussions/27980)). - Check that all services (Celery, Redis, vector store, database) are healthy and your `.env` has `DEBUG=false` and `FLASH_DEBUG=false` ([troubleshooting](https://github.com/langgenius/dify/issues/26171)). - If a file is stuck in "Queuing" after deleting a previous large file, you can clear the queue by restarting the Celery worker (`docker compose restart worker`) or, for advanced users, by manually deleting the relevant Redis keys (this will remove all pending tasks and may require re-uploading documents) ([manual queue clearing](https://github.com/langgenius/dify/discussions/29788)). - If the problem persists, check worker logs for errors and confirm your vector store is not in read-only mode and has enough resources ([docs issue](https://github.com/langgenius/dify-docs/issues/397)). This queuing logic is intentional to ensure safe, sequential processing, but can be improved in future releases. For now, worker restarts and queue checks are the main workarounds. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/6a4edddd-d7e6-4d51-b204-43de939bfb10?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/6a4edddd-d7e6-4d51-b204-43de939bfb10?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/6a4edddd-d7e6-4d51-b204-43de939bfb10?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/6a4edddd-d7e6-4d51-b204-43de939bfb10?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/6a4edddd-d7e6-4d51-b204-43de939bfb10?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/6a4edddd-d7e6-4d51-b204-43de939bfb10?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/6a4edddd-d7e6-4d51-b204-43de939bfb10?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20queuing%20issue%20is%20a%20known%20behavior%20in%20self-hosted%20Dify%20%28Docker%29%20when%20uploading%2C%20deleting%2C%20and%20re-uploading%20large%20files.%20The%20root%20cause%20is%20the%20Redis-backed%20tenant%20queue%20system%3A%20if%20you%20delete%20a%20file%20while%20its%20indexing%20job%20is%20still%20running%2C%20the%20queue%20key%20remains%20active%2C%20so%20any%20new%20uploads%20are%20enqueued%20and%20stay%20in%20%22Queuing%22%20until%20the%20previous%20job%20finishes%20or%20the%20queue%20TTL%20expires.%20This%20is%20by%20design%20to%20avoid%20concurrent%20indexing%20conflicts%2C%20but%20it%20can%20leave%20new%20files%20stuck%20if%20the%20previous%20job%20is%20slow%20or%20interrupted%C2%A0%28%5Bdetails%5D%28https%3A//github.com/langgenius/dify/blob/eabdc5f0ebd806ede0c8f8695d54efb24e61748b/api/core/rag/pipeline/queue.py%23L23-L83%29%29.%0A%0ATo%20resolve%20or%20prevent%20this%3A%0A%0A-%20Make%20sure%20your%20Celery%20worker%20is%20running%20and%20listening%20on%20all%20required%20queues%2C%20especially%20%60priority_dataset%60%2C%20%60priority_pipeline%60%2C%20and%20%60pipeline%60.%20Update%20your%20%60docker-compose.yaml%60%20to%20include%20these%20queues%20and%20restart%20the%20worker%20%28%5Bexample%5D%28https%3A//github.com/langgenius/dify/issues/28513%29%2C%20%5Bexample%20config%5D%28https%3A//github.com/langgenius/dify/discussions/27980%29%29.%0A-%20Check%20that%20all%20services%20%28Celery%2C%20Redis%2C%20vector%20store%2C%20database%29%20are%20healthy%20and%20your%20%60.env%60%20has%20%60DEBUG%3Dfalse%60%20and%20%60FLASH_DEBUG%3Dfalse%60%20%28%5Btroubleshooting%5D%28https%3A//github.com/langgenius/dify/issues/26171%29%29.%0A-%20If%20a%20file%20is%20stuck%20in%20%22Queuing%22%20after%20deleting%20a%20previous%20large%20file%2C%20you%20can%20clear%20the%20queue%20by%20restarting%20the%20Celery%20worker%20%28%60docker%20compose%20restart%20worker%60%29%20or%2C%20for%20advanced%20users%2C%20by%20manually%20deleting%20the%20relevant%20Redis%20keys%20%28this%20will%20remove%20all%20pending%20tasks%20and%20may%20require%20re-uploading%20documents%29%20%28%5Bmanual%20queue%20clearing%5D%28https%3A//github.com/langgenius/dify/discussions/29788%29%29.%0A-%20If%20the%20problem%20persists%2C%20check%20worker%20logs%20for%20errors%20and%20confirm%20your%20vector%20store%20is%20not%20in%20read-only%20mode%20and%20has%20enough%20resources%20%28%5Bdocs%20issue%5D%28https%3A//github.com/langgenius/dify-docs/issues/397%29%29.%0A%0AThis%20queuing%20logic%20is%20intentional%20to%20ensure%20safe%2C%20sequential%20processing%2C%20but%20can%20be%20improved%20in%20future%20releases.%20For%20now%2C%20worker%20restarts%20and%20queue%20checks%20are%20the%20main%20workarounds.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/29990)
Author
Owner

@ChillPilot commented on GitHub (Dec 27, 2025):

@BrianXu001 This may help you!! #30237

@ChillPilot commented on GitHub (Dec 27, 2025): @BrianXu001 This may help you!! #30237
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#21206