Issues related to the minerU plugin #849

Closed
opened 2026-02-16 10:20:42 -05:00 by yindo · 10 comments
Owner

Originally created by @ooodwbooo on GitHub (Dec 2, 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.10.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

minerU plugin 0.5.1

https://github.com/langgenius/dify/discussions/28790
https://github.com/langgenius/dify/discussions/29024

When using the minerU plugin, small files are processed without any problems; however, large files fail if the processing time exceeds 300 seconds. Additionally, the relevant configuration options cannot be found in the env file. What should be done? Moreover, the task ID changes with each run, making it impossible to reuse the cache from a previous processing session.

✔️ Expected Behavior

large files consistently success

Actual Behavior

large files consistently fail after 300 seconds

Originally created by @ooodwbooo on GitHub (Dec 2, 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.10.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce minerU plugin 0.5.1 https://github.com/langgenius/dify/discussions/28790 https://github.com/langgenius/dify/discussions/29024 When using the minerU plugin, small files are processed without any problems; however, large files fail if the processing time exceeds 300 seconds. Additionally, the relevant configuration options cannot be found in the env file. What should be done? Moreover, the task ID changes with each run, making it impossible to reuse the cache from a previous processing session. ### ✔️ Expected Behavior large files consistently success ### ❌ Actual Behavior large files consistently fail after 300 seconds
yindo added the bug label 2026-02-16 10:20:42 -05:00
yindo closed this issue 2026-02-16 10:20:42 -05:00
Author
Owner

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

The 300-second timeout for large files in the minerU plugin is caused by a hardcoded polling mechanism: the plugin retries up to 50 times with a 5-second interval, totaling about 250 seconds before it fails with a timeout error. These values (MAX_RETRIES and the sleep interval) are not configurable via environment variables or plugin settings—they are set directly in the plugin code and confirmed unchanged in recent updates. To increase the timeout, you would need to manually edit these values in tools/mineru/tools/parse.py, rebuild the plugin Docker image, and redeploy it.

The task ID (batch_id) is generated by the remote MinerU API each time a file is processed, so it changes with every run. This design prevents cache reuse based on task ID, and there is no way to persist or configure batch IDs from the plugin side without changes to the upstream API or plugin logic itself.

Workarounds include modifying the plugin code to increase MAX_RETRIES or reduce the polling interval, or splitting large files into smaller chunks. Environment variables like HTTP_REQUEST_MAX_CONNECT_TIMEOUT or PLUGIN_DAEMON_TIMEOUT do not affect this polling timeout. For unrelated connection issues, ensure all containers are on the same Docker network and use a Docker-accessible FILES_URL (e.g., http://nginx) for file access, but this does not resolve the polling timeout for large files.

Manual code changes may be overwritten by future plugin updates, so monitor the repository for any official fixes or new configuration options.
Source 1 | Source 2 | Source 3

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 2, 2025): <!-- Answer --> The 300-second timeout for large files in the minerU plugin is caused by a hardcoded polling mechanism: the plugin retries up to 50 times with a 5-second interval, totaling about 250 seconds before it fails with a timeout error. These values (MAX_RETRIES and the sleep interval) are not configurable via environment variables or plugin settings—they are set directly in the plugin code and confirmed unchanged in recent updates. To increase the timeout, you would need to manually edit these values in tools/mineru/tools/parse.py, rebuild the plugin Docker image, and redeploy it. The task ID (batch_id) is generated by the remote MinerU API each time a file is processed, so it changes with every run. This design prevents cache reuse based on task ID, and there is no way to persist or configure batch IDs from the plugin side without changes to the upstream API or plugin logic itself. Workarounds include modifying the plugin code to increase MAX_RETRIES or reduce the polling interval, or splitting large files into smaller chunks. Environment variables like HTTP_REQUEST_MAX_CONNECT_TIMEOUT or PLUGIN_DAEMON_TIMEOUT do not affect this polling timeout. For unrelated connection issues, ensure all containers are on the same Docker network and use a Docker-accessible FILES_URL (e.g., http://nginx) for file access, but this does not resolve the polling timeout for large files. Manual code changes may be overwritten by future plugin updates, so monitor the repository for any official fixes or new configuration options. [Source 1](https://github.com/langgenius/dify-official-plugins/blob/ce98548234e058990cb0e630b2204e8e243f49bf/tools/mineru/tools/parse.py#L32-L431) | [Source 2](https://github.com/langgenius/dify-official-plugins/pull/771) | [Source 3](https://github.com/langgenius/dify-official-plugins/issues/2116#issuecomment-3562479950) <!-- 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/bbcccd63-8fc9-43c8-a928-95e8ef32ff16?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/bbcccd63-8fc9-43c8-a928-95e8ef32ff16?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/bbcccd63-8fc9-43c8-a928-95e8ef32ff16?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/bbcccd63-8fc9-43c8-a928-95e8ef32ff16?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/bbcccd63-8fc9-43c8-a928-95e8ef32ff16?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/bbcccd63-8fc9-43c8-a928-95e8ef32ff16?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/bbcccd63-8fc9-43c8-a928-95e8ef32ff16?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=The%20300-second%20timeout%20for%20large%20files%20in%20the%20minerU%20plugin%20is%20caused%20by%20a%20hardcoded%20polling%20mechanism%3A%20the%20plugin%20retries%20up%20to%2050%20times%20with%20a%205-second%20interval%2C%20totaling%20about%20250%20seconds%20before%20it%20fails%20with%20a%20timeout%20error.%20These%20values%20%28MAX_RETRIES%20and%20the%20sleep%20interval%29%20are%20not%20configurable%20via%20environment%20variables%20or%20plugin%20settings%E2%80%94they%20are%20set%20directly%20in%20the%20plugin%20code%20and%20confirmed%20unchanged%20in%20recent%20updates.%20To%20increase%20the%20timeout%2C%20you%20would%20need%20to%20manually%20edit%20these%20values%20in%20tools/mineru/tools/parse.py%2C%20rebuild%20the%20plugin%20Docker%20image%2C%20and%20redeploy%20it.%20%0A%0AThe%20task%20ID%20%28batch_id%29%20is%20generated%20by%20the%20remote%20MinerU%20API%20each%20time%20a%20file%20is%20processed%2C%20so%20it%20changes%20with%20every%20run.%20This%20design%20prevents%20cache%20reuse%20based%20on%20task%20ID%2C%20and%20there%20is%20no%20way%20to%20persist%20or%20configure%20batch%20IDs%20from%20the%20plugin%20side%20without%20changes%20to%20the%20upstream%20API%20or%20plugin%20logic%20itself.%0A%0AWorkarounds%20include%20modifying%20the%20plugin%20code%20to%20increase%20MAX_RETRIES%20or%20reduce%20the%20polling%20interval%2C%20or%20splitting%20large%20files%20into%20smaller%20chunks.%20Environment%20variables%20like%20HTTP_REQUEST_MAX_CONNECT_TIMEOUT%20or%20PLUGIN_DAEMON_TIMEOUT%20do%20not%20affect%20this%20polling%20timeout.%20For%20unrelated%20connection%20issues%2C%20ensure%20all%20containers%20are%20on%20the%20same%20Docker%20network%20and%20use%20a%20Docker-accessible%20FILES_URL%20%28e.g.%2C%20http%3A//nginx%29%20for%20file%20access%2C%20but%20this%20does%20not%20resolve%20the%20polling%20timeout%20for%20large%20files.%0A%0AManual%20code%20changes%20may%20be%20overwritten%20by%20future%20plugin%20updates%2C%20so%20monitor%20the%20repository%20for%20any%20official%20fixes%20or%20new%20configuration%20options.%20%20%0A%5BSource%201%5D%28https%3A//github.com/langgenius/dify-official-plugins/blob/ce98548234e058990cb0e630b2204e8e243f49bf/tools/mineru/tools/parse.py%23L32-L431%29%20%7C%20%5BSource%202%5D%28https%3A//github.com/langgenius/dify-official-plugins/pull/771%29%20%7C%20%5BSource%203%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/2116%23issuecomment-3562479950%29)&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/29025)
Author
Owner

@ooodwbooo commented on GitHub (Dec 2, 2025):

The 300-second timeout for large files in the minerU plugin is caused by a hardcoded polling mechanism: the plugin retries up to 50 times with a 5-second interval, totaling about 250 seconds before it fails with a timeout error. These values (MAX_RETRIES and the sleep interval) are not configurable via environment variables or plugin settings—they are set directly in the plugin code and confirmed unchanged in recent updates. To increase the timeout, you would need to manually edit these values in tools/mineru/tools/parse.py, rebuild the plugin Docker image, and redeploy it.

i found it .
How can I build a plugin for Dify?

@ooodwbooo commented on GitHub (Dec 2, 2025): > The 300-second timeout for large files in the minerU plugin is caused by a hardcoded polling mechanism: the plugin retries up to 50 times with a 5-second interval, totaling about 250 seconds before it fails with a timeout error. These values (MAX_RETRIES and the sleep interval) are not configurable via environment variables or plugin settings—they are set directly in the plugin code and confirmed unchanged in recent updates. To increase the timeout, you would need to manually edit these values in tools/mineru/tools/parse.py, rebuild the plugin Docker image, and redeploy it. i found it . How can I build a plugin for Dify?
Author
Owner

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

To build a plugin for Dify, you'll need to:

  1. Decide the plugin type: Tool (for specific tasks), Model (for AI model integrations), or Extension (for custom HTTP endpoints) — each has its own YAML and Python implementation requirements.
  2. Set up a Python 3.11+ environment and install dependencies from requirements.txt (make sure to use dify_plugin>=0.3.0,<0.6.0 for compatibility) — you can add more dependencies as needed in requirements.txt.
  3. Create and edit a manifest.yaml file describing your plugin (version, type, author, label, creation time, icon, resource limits, permissions, and extension YAMLs for tools/models/endpoints). There are some restrictions: you can't extend both tools and models, must have at least one extension, and only one supplier per extension type is allowed.
  4. Implement your plugin logic in Python and define the interface in the corresponding YAML file (usually in the tools/ directory). You can look at example plugins like OpenAI (model), Google Search (tool), or Neko (endpoint) for reference.
  5. For local debugging, copy .env.example to .env, set environment variables (INSTALL_METHOD, REMOTE_INSTALL_URL, REMOTE_INSTALL_KEY), and run your plugin with python -m main. The plugin will show up in your Dify instance as "debugging" mode.
  6. When ready, package your plugin using dify-plugin plugin package ./YOUR_PLUGIN_DIR to generate a .difypkg file. You can then install it in your Dify instance via the UI ("install from local file") or automate publishing with GitHub Actions if you want to contribute to the marketplace.
  7. For logging/debugging, use the built-in logger (from core.logging import logger) instead of print() to avoid leaking sensitive info and to prevent JSON parsing errors in the Plugin Daemon.

If you're modifying an existing plugin (like minerU), make your code changes, then rebuild the Docker image and redeploy it. For custom plugins, after packaging, upload the .difypkg file to your self-hosted Dify instance.

Detailed guides and manifest examples can be found in these plugin guides:

For offline installs or more advanced packaging, see the offline install instructions.

Let me know if you want step-by-step instructions for a specific type of plugin or for rebuilding an existing one!

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 2, 2025): <!-- Answer --> To build a plugin for Dify, you'll need to: 1. Decide the plugin type: Tool (for specific tasks), Model (for AI model integrations), or Extension (for custom HTTP endpoints) — each has its own YAML and Python implementation requirements. 2. Set up a Python 3.11+ environment and install dependencies from requirements.txt (make sure to use `dify_plugin>=0.3.0,<0.6.0` for compatibility) — you can add more dependencies as needed in requirements.txt. 3. Create and edit a manifest.yaml file describing your plugin (version, type, author, label, creation time, icon, resource limits, permissions, and extension YAMLs for tools/models/endpoints). There are some restrictions: you can't extend both tools and models, must have at least one extension, and only one supplier per extension type is allowed. 4. Implement your plugin logic in Python and define the interface in the corresponding YAML file (usually in the tools/ directory). You can look at example plugins like [OpenAI (model)](https://github.com/langgenius/dify-plugin-sdks/tree/main/python/examples/openai), [Google Search (tool)](https://github.com/langgenius/dify-plugin-sdks/tree/main/python/examples/google), or [Neko (endpoint)](https://github.com/langgenius/dify-plugin-sdks/tree/main/python/examples/neko) for reference. 5. For local debugging, copy .env.example to .env, set environment variables (INSTALL_METHOD, REMOTE_INSTALL_URL, REMOTE_INSTALL_KEY), and run your plugin with `python -m main`. The plugin will show up in your Dify instance as "debugging" mode. 6. When ready, package your plugin using `dify-plugin plugin package ./YOUR_PLUGIN_DIR` to generate a .difypkg file. You can then install it in your Dify instance via the UI ("install from local file") or automate publishing with GitHub Actions if you want to contribute to the marketplace. 7. For logging/debugging, use the built-in logger (from core.logging import logger) instead of print() to avoid leaking sensitive info and to prevent JSON parsing errors in the Plugin Daemon. If you're modifying an existing plugin (like minerU), make your code changes, then rebuild the Docker image and redeploy it. For custom plugins, after packaging, upload the .difypkg file to your self-hosted Dify instance. Detailed guides and manifest examples can be found in these plugin guides: - [Attio Plugin Guide](https://github.com/langgenius/dify-official-plugins/blob/main/tools/attio/GUIDE.md) - [DICOM Reader Plugin Guide](https://github.com/langgenius/dify-official-plugins/blob/main/tools/dicom_reader/GUIDE.md) - [Attio Plugin README](https://github.com/langgenius/dify-official-plugins/blob/main/tools/attio/README.md) For offline installs or more advanced packaging, see the [offline install instructions](https://github.com/langgenius/dify-official-plugins/issues/1629). Let me know if you want step-by-step instructions for a specific type of plugin or for rebuilding an existing one! <!-- 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/8a5aedea-28df-45b9-b2b3-bb0efe0a3a07?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/8a5aedea-28df-45b9-b2b3-bb0efe0a3a07?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/8a5aedea-28df-45b9-b2b3-bb0efe0a3a07?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/8a5aedea-28df-45b9-b2b3-bb0efe0a3a07?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/8a5aedea-28df-45b9-b2b3-bb0efe0a3a07?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/8a5aedea-28df-45b9-b2b3-bb0efe0a3a07?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/8a5aedea-28df-45b9-b2b3-bb0efe0a3a07?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=To%20build%20a%20plugin%20for%20Dify%2C%20you%27ll%20need%20to%3A%0A%0A1.%20Decide%20the%20plugin%20type%3A%20Tool%20%28for%20specific%20tasks%29%2C%20Model%20%28for%20AI%20model%20integrations%29%2C%20or%20Extension%20%28for%20custom%20HTTP%20endpoints%29%E2%80%AF%E2%80%94%E2%80%AFeach%20has%20its%20own%20YAML%20and%20Python%20implementation%20requirements.%20%20%0A2.%20Set%20up%20a%20Python%203.11%2B%20environment%20and%20install%20dependencies%20from%20requirements.txt%20%28make%20sure%20to%20use%20%60dify_plugin%3E%3D0.3.0%2C%3C0.6.0%60%20for%20compatibility%29%E2%80%AF%E2%80%94%E2%80%AFyou%20can%20add%20more%20dependencies%20as%20needed%20in%20requirements.txt.%0A3.%20Create%20and%20edit%20a%20manifest.yaml%20file%20describing%20your%20plugin%20%28version%2C%20type%2C%20author%2C%20label%2C%20creation%20time%2C%20icon%2C%20resource%20limits%2C%20permissions%2C%20and%20extension%20YAMLs%20for%20tools/models/endpoints%29.%20There%20are%20some%20restrictions%3A%20you%20can%27t%20extend%20both%20tools%20and%20models%2C%20must%20have%20at%20least%20one%20extension%2C%20and%20only%20one%20supplier%20per%20extension%20type%20is%20allowed.%0A4.%20Implement%20your%20plugin%20logic%20in%20Python%20and%20define%20the%20interface%20in%20the%20corresponding%20YAML%20file%20%28usually%20in%20the%20tools/%20directory%29.%20You%20can%20look%20at%20example%20plugins%20like%20%5BOpenAI%20%28model%29%5D%28https%3A//github.com/langgenius/dify-plugin-sdks/tree/main/python/examples/openai%29%2C%20%5BGoogle%20Search%20%28tool%29%5D%28https%3A//github.com/langgenius/dify-plugin-sdks/tree/main/python/examples/google%29%2C%20or%20%5BNeko%20%28endpoint%29%5D%28https%3A//github.com/langgenius/dify-plugin-sdks/tree/main/python/examples/neko%29%20for%20reference.%0A5.%20For%20local%20debugging%2C%20copy%20.env.example%20to%20.env%2C%20set%20environment%20variables%20%28INSTALL_METHOD%2C%20REMOTE_INSTALL_URL%2C%20REMOTE_INSTALL_KEY%29%2C%20and%20run%20your%20plugin%20with%20%60python%20-m%20main%60.%20The%20plugin%20will%20show%20up%20in%20your%20Dify%20instance%20as%20%22debugging%22%20mode.%0A6.%20When%20ready%2C%20package%20your%20plugin%20using%20%60dify-plugin%20plugin%20package%20./YOUR_PLUGIN_DIR%60%20to%20generate%20a%20.difypkg%20file.%20You%20can%20then%20install%20it%20in%20your%20Dify%20instance%20via%20the%20UI%20%28%22install%20from%20local%20file%22%29%20or%20automate%20publishing%20with%20GitHub%20Actions%20if%20you%20want%20to%20contribute%20to%20the%20marketplace.%0A7.%20For%20logging/debugging%2C%20use%20the%20built-in%20logger%20%28from%20core.logging%20import%20logger%29%20instead%20of%20print%28%29%20to%20avoid%20leaking%20sensitive%20info%20and%20to%20prevent%20JSON%20parsing%20errors%20in%20the%20Plugin%20Daemon.%0A%0AIf%20you%27re%20modifying%20an%20existing%20plugin%20%28like%20minerU%29%2C%20make%20your%20code%20changes%2C%20then%20rebuild%20the%20Docker%20image%20and%20redeploy%20it.%20For%20custom%20plugins%2C%20after%20packaging%2C%20upload%20the%20.difypkg%20file%20to%20your%20self-hosted%20Dify%20instance.%0A%0ADetailed%20guides%20and%20manifest%20examples%20can%20be%20found%20in%20these%20plugin%20guides%3A%20%20%0A-%20%5BAttio%20Plugin%20Guide%5D%28https%3A//github.com/langgenius/dify-official-plugins/blob/main/tools/attio/GUIDE.md%29%20%20%0A-%20%5BDICOM%20Reader%20Plugin%20Guide%5D%28https%3A//github.com/langgenius/dify-official-plugins/blob/main/tools/dicom_reader/GUIDE.md%29%20%20%0A-%20%5BAttio%20Plugin%20README%5D%28https%3A//github.com/langgenius/dify-official-plugins/blob/main/tools/attio/README.md%29%20%20%0A%0AFor%20offline%20installs%20or%20more%20advanced%20packaging%2C%20see%20the%20%5Boffline%20install%20instructions%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/1629%29.%0A%0ALet%20me%20know%20if%20you%20want%20step-by-step%20instructions%20for%20a%20specific%20type%20of%20plugin%20or%20for%20rebuilding%20an%20existing%20one%21)&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/29025)
Author
Owner

@ooodwbooo commented on GitHub (Dec 2, 2025):

I modified the MinerU code, but encountered an error when installing the packaged version.

req_id: a6ef68f1ba PluginDaemonBadRequestError: plugin verification has been enabled, and the plugin you want to install has a bad signature
@ooodwbooo commented on GitHub (Dec 2, 2025): I modified the MinerU code, but encountered an error when installing the packaged version. ``` req_id: a6ef68f1ba PluginDaemonBadRequestError: plugin verification has been enabled, and the plugin you want to install has a bad signature ```
Author
Owner

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

This error happens because Dify's plugin signature verification is enabled, and modifying the MinerU code invalidates the original signature. There are two ways to proceed:

For development/testing:
You can disable signature verification by setting FORCE_VERIFYING_SIGNATURE=false in your .env file (usually in dify/docker), then restart your Dify containers. This will let you install modified plugins without signature checks.
Reference: GitHub Issue langgenius/dify#1629

For production or if verification must remain enabled:
You need to sign your modified plugin with your own key pair and configure Dify to trust your public key.

  • Generate a key pair:
    dify signature generate -f your_key_pair
    
  • Sign your plugin:
    dify signature sign your_plugin_project.difypkg -p your_key_pair.private.pem
    
  • Place the public key in a directory accessible to the plugin daemon, and set these environment variables in your Docker Compose override or plugin_daemon container:
    FORCE_VERIFYING_SIGNATURE=true
    THIRD_PARTY_SIGNATURE_VERIFICATION_ENABLED=true
    THIRD_PARTY_SIGNATURE_VERIFICATION_PUBLIC_KEYS=/app/storage/public_keys/your_key_pair.public.pem
    
  • Restart Dify to apply changes.

Full details and CLI commands are in the official docs:
Third-party signature verification guide

Disabling verification is fine for local development, but for production, signing your plugin and configuring trusted keys is recommended for security.

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 2, 2025): <!-- Answer --> This error happens because Dify's plugin signature verification is enabled, and modifying the MinerU code invalidates the original signature. There are two ways to proceed: **For development/testing:** You can disable signature verification by setting `FORCE_VERIFYING_SIGNATURE=false` in your `.env` file (usually in `dify/docker`), then restart your Dify containers. This will let you install modified plugins without signature checks. [Reference: GitHub Issue langgenius/dify#1629](https://github.com/langgenius/dify-official-plugins/issues/1629) **For production or if verification must remain enabled:** You need to sign your modified plugin with your own key pair and configure Dify to trust your public key. - Generate a key pair: ```bash dify signature generate -f your_key_pair ``` - Sign your plugin: ```bash dify signature sign your_plugin_project.difypkg -p your_key_pair.private.pem ``` - Place the public key in a directory accessible to the plugin daemon, and set these environment variables in your Docker Compose override or plugin_daemon container: ``` FORCE_VERIFYING_SIGNATURE=true THIRD_PARTY_SIGNATURE_VERIFICATION_ENABLED=true THIRD_PARTY_SIGNATURE_VERIFICATION_PUBLIC_KEYS=/app/storage/public_keys/your_key_pair.public.pem ``` - Restart Dify to apply changes. Full details and CLI commands are in the official docs: [Third-party signature verification guide](https://github.com/langgenius/dify-docs/blob/f9c1a5f424594f5801b41e13dacf616e5281055e/plugin-dev-en/0312-third-party-signature-verification.mdx#L9-L106) Disabling verification is fine for local development, but for production, signing your plugin and configuring trusted keys is recommended for security. <!-- 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/d2e35e74-58ad-48c1-ab1e-e9c433bf7197?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/d2e35e74-58ad-48c1-ab1e-e9c433bf7197?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/d2e35e74-58ad-48c1-ab1e-e9c433bf7197?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/d2e35e74-58ad-48c1-ab1e-e9c433bf7197?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/d2e35e74-58ad-48c1-ab1e-e9c433bf7197?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/d2e35e74-58ad-48c1-ab1e-e9c433bf7197?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/d2e35e74-58ad-48c1-ab1e-e9c433bf7197?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%20error%20happens%20because%20Dify%27s%20plugin%20signature%20verification%20is%20enabled%2C%20and%20modifying%20the%20MinerU%20code%20invalidates%20the%20original%20signature.%20There%20are%20two%20ways%20to%20proceed%3A%0A%0A%2A%2AFor%20development/testing%3A%2A%2A%20%20%0AYou%20can%20disable%20signature%20verification%20by%20setting%20%60FORCE_VERIFYING_SIGNATURE%3Dfalse%60%20in%20your%20%60.env%60%20file%20%28usually%20in%20%60dify/docker%60%29%2C%20then%20restart%20your%20Dify%20containers.%20This%20will%20let%20you%20install%20modified%20plugins%20without%20signature%20checks.%20%20%0A%5BReference%3A%20GitHub%20Issue%20%231629%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/1629%29%0A%0A%2A%2AFor%20production%20or%20if%20verification%20must%20remain%20enabled%3A%2A%2A%20%20%0AYou%20need%20to%20sign%20your%20modified%20plugin%20with%20your%20own%20key%20pair%20and%20configure%20Dify%20to%20trust%20your%20public%20key.%20%20%0A-%20Generate%20a%20key%20pair%3A%20%20%0A%20%20%60%60%60bash%0A%20%20dify%20signature%20generate%20-f%20your_key_pair%0A%20%20%60%60%60%0A-%20Sign%20your%20plugin%3A%20%20%0A%20%20%60%60%60bash%0A%20%20dify%20signature%20sign%20your_plugin_project.difypkg%20-p%20your_key_pair.private.pem%0A%20%20%60%60%60%0A-%20Place%20the%20public%20key%20in%20a%20directory%20accessible%20to%20the%20plugin%20daemon%2C%20and%20set%20these%20environment%20variables%20in%20your%20Docker%20Compose%20override%20or%20plugin_daemon%20container%3A%0A%20%20%60%60%60%0A%20%20FORCE_VERIFYING_SIGNATURE%3Dtrue%0A%20%20THIRD_PARTY_SIGNATURE_VERIFICATION_ENABLED%3Dtrue%0A%20%20THIRD_PARTY_SIGNATURE_VERIFICATION_PUBLIC_KEYS%3D/app/storage/public_keys/your_key_pair.public.pem%0A%20%20%60%60%60%0A-%20Restart%20Dify%20to%20apply%20changes.%0A%0AFull%20details%20and%20CLI%20commands%20are%20in%20the%20official%20docs%3A%20%20%0A%5BThird-party%20signature%20verification%20guide%5D%28https%3A//github.com/langgenius/dify-docs/blob/f9c1a5f424594f5801b41e13dacf616e5281055e/plugin-dev-en/0312-third-party-signature-verification.mdx%23L9-L106%29%0A%0ADisabling%20verification%20is%20fine%20for%20local%20development%2C%20but%20for%20production%2C%20signing%20your%20plugin%20and%20configuring%20trusted%20keys%20is%20recommended%20for%20security.)&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/29025)
Author
Owner

@ooodwbooo commented on GitHub (Dec 2, 2025):

FORCE_VERIFYING_SIGNATURE=false
ENFORCE_LANGGENIUS_PLUGIN_SIGNATURES=false

MAX_RETRIES=500

I have revised the content above, packaged and installed the plugin, but it still reports an error after exceeding 300 seconds.
@dosu
@dosu.

@ooodwbooo commented on GitHub (Dec 2, 2025): FORCE_VERIFYING_SIGNATURE=false ENFORCE_LANGGENIUS_PLUGIN_SIGNATURES=false MAX_RETRIES=500 I have revised the content above, packaged and installed the plugin, but it still reports an error after exceeding 300 seconds. @dosu [@dosu](https://go.dosu.dev/dosubot).
Author
Owner

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

If the plugin still fails after 300 seconds even with MAX_RETRIES increased, the timeout is almost certainly enforced by your infrastructure—most commonly nginx, traefik, or Docker network/proxy settings—which often default to 300 seconds and override application-level changes. To resolve this, increase these timeouts in your Docker .env and docker-compose.yaml (e.g., GUNICORN_TIMEOUT, NGINX_PROXY_READ_TIMEOUT, NGINX_PROXY_SEND_TIMEOUT, PLUGIN_MAX_EXECUTION_TIMEOUT, DIFY_BACKWARDS_INVOCATION_READ_TIMEOUT), and in your nginx config (set proxy_read_timeout and proxy_send_timeout to 3600s, proxy_buffering off, proxy_http_version 1.1, proxy_set_header Connection ""). Restart all related containers and nginx after making these changes. If you’re running Uvicorn directly, increase --timeout-keep-alive as well.

If you’ve already done all this and still see the 300s cutoff, please share the exact error message or stack trace you get after the timeout—this will help pinpoint which layer is enforcing the limit.
Reference | Reference

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 2, 2025): <!-- Answer --> If the plugin still fails after 300 seconds even with MAX_RETRIES increased, the timeout is almost certainly enforced by your infrastructure—most commonly nginx, traefik, or Docker network/proxy settings—which often default to 300 seconds and override application-level changes. To resolve this, increase these timeouts in your Docker `.env` and `docker-compose.yaml` (e.g., GUNICORN_TIMEOUT, NGINX_PROXY_READ_TIMEOUT, NGINX_PROXY_SEND_TIMEOUT, PLUGIN_MAX_EXECUTION_TIMEOUT, DIFY_BACKWARDS_INVOCATION_READ_TIMEOUT), and in your nginx config (set `proxy_read_timeout` and `proxy_send_timeout` to 3600s, `proxy_buffering off`, `proxy_http_version 1.1`, `proxy_set_header Connection ""`). Restart all related containers and nginx after making these changes. If you’re running Uvicorn directly, increase `--timeout-keep-alive` as well. If you’ve already done all this and still see the 300s cutoff, please share the exact error message or stack trace you get after the timeout—this will help pinpoint which layer is enforcing the limit. [Reference](https://github.com/langgenius/dify-official-plugins/issues/2157#issuecomment-3594951076) | [Reference](https://github.com/langgenius/dify-official-plugins/issues/1705#issuecomment-3297139649) <!-- 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/10ba9816-aee8-42fd-bca7-a5b52deaf9e2?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/10ba9816-aee8-42fd-bca7-a5b52deaf9e2?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/10ba9816-aee8-42fd-bca7-a5b52deaf9e2?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/10ba9816-aee8-42fd-bca7-a5b52deaf9e2?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/10ba9816-aee8-42fd-bca7-a5b52deaf9e2?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/10ba9816-aee8-42fd-bca7-a5b52deaf9e2?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/10ba9816-aee8-42fd-bca7-a5b52deaf9e2?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=If%20the%20plugin%20still%20fails%20after%20300%20seconds%20even%20with%20MAX_RETRIES%20increased%2C%20the%20timeout%20is%20almost%20certainly%20enforced%20by%20your%20infrastructure%E2%80%94most%20commonly%20nginx%2C%20traefik%2C%20or%20Docker%20network/proxy%20settings%E2%80%94which%20often%20default%20to%20300%20seconds%20and%20override%20application-level%20changes.%20To%20resolve%20this%2C%20increase%20these%20timeouts%20in%20your%20Docker%20%60.env%60%20and%20%60docker-compose.yaml%60%20%28e.g.%2C%20GUNICORN_TIMEOUT%2C%20NGINX_PROXY_READ_TIMEOUT%2C%20NGINX_PROXY_SEND_TIMEOUT%2C%20PLUGIN_MAX_EXECUTION_TIMEOUT%2C%20DIFY_BACKWARDS_INVOCATION_READ_TIMEOUT%29%2C%20and%20in%20your%20nginx%20config%20%28set%20%60proxy_read_timeout%60%20and%20%60proxy_send_timeout%60%20to%203600s%2C%20%60proxy_buffering%20off%60%2C%20%60proxy_http_version%201.1%60%2C%20%60proxy_set_header%20Connection%20%22%22%60%29.%20Restart%20all%20related%20containers%20and%20nginx%20after%20making%20these%20changes.%20If%20you%E2%80%99re%20running%20Uvicorn%20directly%2C%20increase%20%60--timeout-keep-alive%60%20as%20well.%20%0A%0AIf%20you%E2%80%99ve%20already%20done%20all%20this%20and%20still%20see%20the%20300s%20cutoff%2C%20please%20share%20the%20exact%20error%20message%20or%20stack%20trace%20you%20get%20after%20the%20timeout%E2%80%94this%20will%20help%20pinpoint%20which%20layer%20is%20enforcing%20the%20limit.%20%20%0A%5BReference%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/2157%23issuecomment-3594951076%29%20%7C%20%5BReference%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/1705%23issuecomment-3297139649%29)&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/29025)
Author
Owner

@ooodwbooo commented on GitHub (Dec 2, 2025):

https://github.com/langgenius/dify/discussions/28790
For further details, please refer to the link provided above.
@dosu
@dosu.

@ooodwbooo commented on GitHub (Dec 2, 2025): https://github.com/langgenius/dify/discussions/28790 For further details, please refer to the link provided above. @dosu [@dosu](https://go.dosu.dev/dosubot).
Author
Owner

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

The discussion you linked is highly relevant: persistent 300s timeouts are almost always enforced by infrastructure, not just plugin code. In Dify’s Docker setup, you need to raise all relevant timeouts above 300s in your .env and docker-compose.yaml—specifically: GUNICORN_TIMEOUT, PLUGIN_MAX_EXECUTION_TIMEOUT, NGINX_PROXY_READ_TIMEOUT, NGINX_PROXY_SEND_TIMEOUT, and (if present) PLUGIN_DAEMON_TIMEOUT (set to e.g. 1200). In your nginx config, make sure proxy_read_timeout and proxy_send_timeout are set to 3600s, proxy_buffering off, proxy_http_version 1.1, and proxy_set_header Connection "" source.

After changing these, restart all related containers and nginx. Also, confirm that all containers are healthy, on the same Docker network, and that PLUGIN_DAEMON_URL and PLUGIN_DAEMON_KEY are correct. If you still hit a 300s cutoff, check the plugin_daemon and nginx logs for timeout errors—this will help pinpoint which layer is enforcing the limit source.

Don’t set both DEBUG and FLASK_DEBUG to true at the same time, and keep FLASK_DEBUG off in production for stability. If the issue persists after all config changes, try splitting large files, using a different plugin, or running Dify outside Docker to rule out proxy/network issues source.

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 2, 2025): <!-- Answer --> The discussion you linked is highly relevant: persistent 300s timeouts are almost always enforced by infrastructure, not just plugin code. In Dify’s Docker setup, you need to raise all relevant timeouts above 300s in your `.env` and `docker-compose.yaml`—specifically: `GUNICORN_TIMEOUT`, `PLUGIN_MAX_EXECUTION_TIMEOUT`, `NGINX_PROXY_READ_TIMEOUT`, `NGINX_PROXY_SEND_TIMEOUT`, and (if present) `PLUGIN_DAEMON_TIMEOUT` (set to e.g. 1200). In your nginx config, make sure `proxy_read_timeout` and `proxy_send_timeout` are set to 3600s, `proxy_buffering off`, `proxy_http_version 1.1`, and `proxy_set_header Connection ""` [source](https://github.com/langgenius/dify/blob/f48522e923369a28a1efaa4e4fa7325229147d0c/docker/.env.example#L83-L1336). After changing these, restart all related containers and nginx. Also, confirm that all containers are healthy, on the same Docker network, and that `PLUGIN_DAEMON_URL` and `PLUGIN_DAEMON_KEY` are correct. If you still hit a 300s cutoff, check the plugin_daemon and nginx logs for timeout errors—this will help pinpoint which layer is enforcing the limit [source](https://github.com/langgenius/dify-official-plugins/issues/2116). Don’t set both `DEBUG` and `FLASK_DEBUG` to true at the same time, and keep `FLASK_DEBUG` off in production for stability. If the issue persists after all config changes, try splitting large files, using a different plugin, or running Dify outside Docker to rule out proxy/network issues [source](https://github.com/langgenius/dify-official-plugins/issues/1705). <!-- 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/b7b23d4d-8350-4100-8f46-2c667c3f6ca1?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/b7b23d4d-8350-4100-8f46-2c667c3f6ca1?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/b7b23d4d-8350-4100-8f46-2c667c3f6ca1?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/b7b23d4d-8350-4100-8f46-2c667c3f6ca1?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/b7b23d4d-8350-4100-8f46-2c667c3f6ca1?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/b7b23d4d-8350-4100-8f46-2c667c3f6ca1?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/b7b23d4d-8350-4100-8f46-2c667c3f6ca1?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=The%20discussion%20you%20linked%20is%20highly%20relevant%3A%20persistent%20300s%20timeouts%20are%20almost%20always%20enforced%20by%20infrastructure%2C%20not%20just%20plugin%20code.%20In%20Dify%E2%80%99s%20Docker%20setup%2C%20you%20need%20to%20raise%20all%20relevant%20timeouts%20above%20300s%20in%20your%20%60.env%60%20and%20%60docker-compose.yaml%60%E2%80%94specifically%3A%20%60GUNICORN_TIMEOUT%60%2C%20%60PLUGIN_MAX_EXECUTION_TIMEOUT%60%2C%20%60NGINX_PROXY_READ_TIMEOUT%60%2C%20%60NGINX_PROXY_SEND_TIMEOUT%60%2C%20and%20%28if%20present%29%20%60PLUGIN_DAEMON_TIMEOUT%60%20%28set%20to%20e.g.%201200%29.%20In%20your%20nginx%20config%2C%20make%20sure%20%60proxy_read_timeout%60%20and%20%60proxy_send_timeout%60%20are%20set%20to%203600s%2C%20%60proxy_buffering%20off%60%2C%20%60proxy_http_version%201.1%60%2C%20and%20%60proxy_set_header%20Connection%20%22%22%60%20%5Bsource%5D%28https%3A//github.com/langgenius/dify/blob/f48522e923369a28a1efaa4e4fa7325229147d0c/docker/.env.example%23L83-L1336%29.%0A%0AAfter%20changing%20these%2C%20restart%20all%20related%20containers%20and%20nginx.%20Also%2C%20confirm%20that%20all%20containers%20are%20healthy%2C%20on%20the%20same%20Docker%20network%2C%20and%20that%20%60PLUGIN_DAEMON_URL%60%20and%20%60PLUGIN_DAEMON_KEY%60%20are%20correct.%20If%20you%20still%20hit%20a%20300s%20cutoff%2C%20check%20the%20plugin_daemon%20and%20nginx%20logs%20for%20timeout%20errors%E2%80%94this%20will%20help%20pinpoint%20which%20layer%20is%20enforcing%20the%20limit%20%5Bsource%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/2116%29.%0A%0ADon%E2%80%99t%20set%20both%20%60DEBUG%60%20and%20%60FLASK_DEBUG%60%20to%20true%20at%20the%20same%20time%2C%20and%20keep%20%60FLASK_DEBUG%60%20off%20in%20production%20for%20stability.%20If%20the%20issue%20persists%20after%20all%20config%20changes%2C%20try%20splitting%20large%20files%2C%20using%20a%20different%20plugin%2C%20or%20running%20Dify%20outside%20Docker%20to%20rule%20out%20proxy/network%20issues%20%5Bsource%5D%28https%3A//github.com/langgenius/dify-official-plugins/issues/1705%29.)&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/29025)
Author
Owner

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

The minerU plugin's timeout for large files is hardcoded in its code: it polls for results up to 50 times with a 5-second interval, so the maximum wait is about 250 seconds. This is not configurable via environment variables or the env file, which is why you can't find relevant options to adjust the timeout. To increase the timeout, you would need to modify the plugin code directly by raising the MAX_RETRIES value or reducing the sleep interval in the polling loop. There are currently no official configuration options for this.

Regarding cache reuse, the plugin generates a new task ID (batch_id) for each run, as the batch ID is created by the server when a new parsing task is started. There is no mechanism in the code to persist or reuse batch IDs, so cache reuse is not possible with the current implementation.

Workarounds include modifying the plugin code to increase retries, splitting large files into smaller chunks, or adjusting infrastructure-level timeouts, but these all require manual intervention. For more details, see the relevant code and discussion here.

To reply, just mention @dosu.


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

Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Dec 2, 2025): <!-- Answer --> The minerU plugin's timeout for large files is hardcoded in its code: it polls for results up to 50 times with a 5-second interval, so the maximum wait is about 250 seconds. This is not configurable via environment variables or the env file, which is why you can't find relevant options to adjust the timeout. To increase the timeout, you would need to modify the plugin code directly by raising the `MAX_RETRIES` value or reducing the sleep interval in the polling loop. There are currently no official configuration options for this. Regarding cache reuse, the plugin generates a new task ID (`batch_id`) for each run, as the batch ID is created by the server when a new parsing task is started. There is no mechanism in the code to persist or reuse batch IDs, so cache reuse is not possible with the current implementation. Workarounds include modifying the plugin code to increase retries, splitting large files into smaller chunks, or adjusting infrastructure-level timeouts, but these all require manual intervention. For more details, see the relevant code and discussion [here](https://github.com/langgenius/dify-official-plugins/blob/ce98548234e058990cb0e630b2204e8e243f49bf/tools/mineru/tools/parse.py#L32-L431). <!-- 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/8e4812da-4a30-4613-b255-a285dbf9bb91?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/8e4812da-4a30-4613-b255-a285dbf9bb91?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/8e4812da-4a30-4613-b255-a285dbf9bb91?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/8e4812da-4a30-4613-b255-a285dbf9bb91?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/8e4812da-4a30-4613-b255-a285dbf9bb91?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/8e4812da-4a30-4613-b255-a285dbf9bb91?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/8e4812da-4a30-4613-b255-a285dbf9bb91?feedback_type=other)</sup> [![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=The%20minerU%20plugin%27s%20timeout%20for%20large%20files%20is%20hardcoded%20in%20its%20code%3A%20it%20polls%20for%20results%20up%20to%2050%20times%20with%20a%205-second%20interval%2C%20so%20the%20maximum%20wait%20is%20about%20250%20seconds.%20This%20is%20not%20configurable%20via%20environment%20variables%20or%20the%20env%20file%2C%20which%20is%20why%20you%20can%27t%20find%20relevant%20options%20to%20adjust%20the%20timeout.%20To%20increase%20the%20timeout%2C%20you%20would%20need%20to%20modify%20the%20plugin%20code%20directly%20by%20raising%20the%20%60MAX_RETRIES%60%20value%20or%20reducing%20the%20sleep%20interval%20in%20the%20polling%20loop.%20There%20are%20currently%20no%20official%20configuration%20options%20for%20this.%0A%0ARegarding%20cache%20reuse%2C%20the%20plugin%20generates%20a%20new%20task%20ID%20%28%60batch_id%60%29%20for%20each%20run%2C%20as%20the%20batch%20ID%20is%20created%20by%20the%20server%20when%20a%20new%20parsing%20task%20is%20started.%20There%20is%20no%20mechanism%20in%20the%20code%20to%20persist%20or%20reuse%20batch%20IDs%2C%20so%20cache%20reuse%20is%20not%20possible%20with%20the%20current%20implementation.%20%0A%0AWorkarounds%20include%20modifying%20the%20plugin%20code%20to%20increase%20retries%2C%20splitting%20large%20files%20into%20smaller%20chunks%2C%20or%20adjusting%20infrastructure-level%20timeouts%2C%20but%20these%20all%20require%20manual%20intervention.%20For%20more%20details%2C%20see%20the%20relevant%20code%20and%20discussion%20%5Bhere%5D%28https%3A//github.com/langgenius/dify-official-plugins/blob/ce98548234e058990cb0e630b2204e8e243f49bf/tools/mineru/tools/parse.py%23L32-L431%29.)&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-official-plugins/issues/2166)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#849