[PR #23980] chore: add configurable stdio buffer sizes for plugins in compose file #30465

Closed
opened 2026-02-21 20:47:33 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/23980

State: closed
Merged: Yes


Summary

Related https://github.com/langgenius/dify-plugin-daemon/pull/256

This pull request adds new environment variables to configure plugin standard input/output (STDIO) buffer sizes across Docker environment files and compose configurations. These changes help control how much data plugins can read/write at once, improving resource management and potentially preventing buffer overflows.

Configuration updates for plugin STDIO buffer sizes:

  • Added PLUGIN_STDIO_BUFFER_SIZE and PLUGIN_STDIO_MAX_BUFFER_SIZE environment variables to docker/.env.example, allowing users to set default and maximum buffer sizes for plugin STDIO operations.
  • Updated docker/docker-compose-template.yaml to pass the new buffer size variables to service containers, ensuring they are available during plugin execution.
  • Added the buffer size variables to the shared environment section (x-shared-env) of docker/docker-compose.yaml, making them accessible to all relevant services.
  • Updated the service environment variables in docker/docker-compose.yaml to include the new STDIO buffer size settings for plugin containers.

Screenshots

Before After
... ...

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
**Original Pull Request:** https://github.com/langgenius/dify/pull/23980 **State:** closed **Merged:** Yes --- ## Summary Related https://github.com/langgenius/dify-plugin-daemon/pull/256 This pull request adds new environment variables to configure plugin standard input/output (STDIO) buffer sizes across Docker environment files and compose configurations. These changes help control how much data plugins can read/write at once, improving resource management and potentially preventing buffer overflows. Configuration updates for plugin STDIO buffer sizes: * Added `PLUGIN_STDIO_BUFFER_SIZE` and `PLUGIN_STDIO_MAX_BUFFER_SIZE` environment variables to `docker/.env.example`, allowing users to set default and maximum buffer sizes for plugin STDIO operations. * Updated `docker/docker-compose-template.yaml` to pass the new buffer size variables to service containers, ensuring they are available during plugin execution. * Added the buffer size variables to the shared environment section (`x-shared-env`) of `docker/docker-compose.yaml`, making them accessible to all relevant services. * Updated the service environment variables in `docker/docker-compose.yaml` to include the new STDIO buffer size settings for plugin containers. - close https://github.com/langgenius/dify-official-plugins/issues/1000 - fix langgenius/dify#307 - fix https://github.com/langgenius/dify-official-plugins/issues/1226 - fix https://github.com/langgenius/dify-official-plugins/issues/1002 - fix https://github.com/langgenius/dify-official-plugins/issues/1000 - fix https://github.com/langgenius/dify-official-plugins/issues/953 - fix https://github.com/langgenius/dify/issues/18501 - fix https://github.com/langgenius/dify/issues/19978 - fix https://github.com/langgenius/dify/issues/20270 ## Screenshots | Before | After | |--------|-------| | ... | ... | ## Checklist - [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!) - [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change. - [x] I've updated the documentation accordingly. - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods
yindo added the pull-request label 2026-02-21 20:47:33 -05:00
yindo closed this issue 2026-02-21 20:47:33 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#30465