[PR #385] [MERGED] refactor(plugin_manager): enhance HTTP client timeout handling in ser… #481

Closed
opened 2026-02-16 01:16:06 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-daemon/pull/385
Author: @Yeuoly
Created: 7/4/2025
Status: Merged
Merged: 7/9/2025
Merged by: @Yeuoly

Base: mainHead: fix/memory-leak


📝 Commits (3)

  • 39f9191 refactor(plugin_manager): enhance HTTP client timeout handling in serverless runtime with DialContext
  • 59850ee refactor(plugin_manager): remove write deadline setting in serverless runtime connection initialization
  • 2cf31b0 refactor(plugin_manager): adjust HTTP client timeout settings in serverless runtime

📊 Changes

3 files changed (+13 additions, -13 deletions)

View changed files

📝 internal/core/plugin_manager/serverless_runtime/environment.go (+13 -5)
📝 internal/core/plugin_manager/serverless_runtime/io.go (+0 -1)
📝 internal/utils/http_requests/http_request.go (+0 -7)

📄 Description

…verless runtime with DialContext

  • Updated the HTTP client in the ServerlessPluginRuntime to use a context-aware DialContext for better timeout management.
  • Removed the write timeout option from the HTTP request builder, streamlining the request handling process.
  • Improved connection handling by setting write deadlines based on the PluginMaxExecutionTimeout.

This change enhances the reliability of network operations within the serverless runtime environment.

Description

Please provide a brief description of the changes made in this pull request.
Please also include the issue number if this is related to an issue using the format Fixes #123 or Closes #123.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Performance improvement
  • Other

Essential Checklist

Testing

  • I have tested the changes locally and confirmed they work as expected
  • I have added unit tests where necessary and they pass successfully

Bug Fix (if applicable)

  • I have used GitHub syntax to close the related issue (e.g., Fixes #123 or Closes #123)

Additional Information

Please provide any additional context that would help reviewers understand the changes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-plugin-daemon/pull/385 **Author:** [@Yeuoly](https://github.com/Yeuoly) **Created:** 7/4/2025 **Status:** ✅ Merged **Merged:** 7/9/2025 **Merged by:** [@Yeuoly](https://github.com/Yeuoly) **Base:** `main` ← **Head:** `fix/memory-leak` --- ### 📝 Commits (3) - [`39f9191`](https://github.com/langgenius/dify-plugin-daemon/commit/39f9191de36c5cd1152f9091a64b79c89f9bb1d0) refactor(plugin_manager): enhance HTTP client timeout handling in serverless runtime with DialContext - [`59850ee`](https://github.com/langgenius/dify-plugin-daemon/commit/59850ee13c12e3ca470033f662c39a3597f30c86) refactor(plugin_manager): remove write deadline setting in serverless runtime connection initialization - [`2cf31b0`](https://github.com/langgenius/dify-plugin-daemon/commit/2cf31b01eb6e79b58207f6299502e9b1c43e689e) refactor(plugin_manager): adjust HTTP client timeout settings in serverless runtime ### 📊 Changes **3 files changed** (+13 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `internal/core/plugin_manager/serverless_runtime/environment.go` (+13 -5) 📝 `internal/core/plugin_manager/serverless_runtime/io.go` (+0 -1) 📝 `internal/utils/http_requests/http_request.go` (+0 -7) </details> ### 📄 Description …verless runtime with DialContext - Updated the HTTP client in the ServerlessPluginRuntime to use a context-aware DialContext for better timeout management. - Removed the write timeout option from the HTTP request builder, streamlining the request handling process. - Improved connection handling by setting write deadlines based on the PluginMaxExecutionTimeout. This change enhances the reliability of network operations within the serverless runtime environment. ## Description Please provide a brief description of the changes made in this pull request. Please also include the issue number if this is related to an issue using the format `Fixes #123` or `Closes #123`. ## Type of Change - [ ] Bug fix - [ ] New feature - [ ] Refactor - [ ] Performance improvement - [ ] Other ## Essential Checklist ### Testing - [ ] I have tested the changes locally and confirmed they work as expected - [ ] I have added unit tests where necessary and they pass successfully ### Bug Fix (if applicable) - [ ] I have used GitHub syntax to close the related issue (e.g., `Fixes #123` or `Closes #123`) ## Additional Information Please provide any additional context that would help reviewers understand the changes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 01:16:06 -05:00
yindo closed this issue 2026-02-16 01:16:06 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#481