[PR #17] [MERGED] Enhance tunnel cleanup logic with subrequest limit protection #16

Closed
opened 2026-03-04 01:38:09 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/tuanngocptn/nport/pull/17
Author: @tuanngocptn
Created: 2/5/2026
Status: Merged
Merged: 2/5/2026
Merged by: @tuanngocptn

Base: mainHead: fix/set_timeout_on_server


📝 Commits (1)

  • af12f3e Enhance tunnel cleanup logic with subrequest limit protection

📊 Changes

3 files changed (+80 additions, -22 deletions)

View changed files

📝 server/CHANGELOG.md (+17 -5)
📝 server/src/index.ts (+61 -16)
📝 server/wrangler.jsonc (+2 -1)

📄 Description

  • Implemented MAX_CLEANUPS_PER_RUN environment variable to limit the number of tunnels cleaned per cron run, defaulting to 10 to comply with Cloudflare's subrequest limits.
  • Updated the scheduled cleanup job to handle errors per tunnel, ensuring one failure does not halt the entire cleanup process.
  • Enhanced CHANGELOG to document the new feature and improvements in error handling during cleanup.

🔄 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/tuanngocptn/nport/pull/17 **Author:** [@tuanngocptn](https://github.com/tuanngocptn) **Created:** 2/5/2026 **Status:** ✅ Merged **Merged:** 2/5/2026 **Merged by:** [@tuanngocptn](https://github.com/tuanngocptn) **Base:** `main` ← **Head:** `fix/set_timeout_on_server` --- ### 📝 Commits (1) - [`af12f3e`](https://github.com/tuanngocptn/nport/commit/af12f3e6620e4cffb0b7386b58633d1ae0fa25ce) Enhance tunnel cleanup logic with subrequest limit protection ### 📊 Changes **3 files changed** (+80 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `server/CHANGELOG.md` (+17 -5) 📝 `server/src/index.ts` (+61 -16) 📝 `server/wrangler.jsonc` (+2 -1) </details> ### 📄 Description - Implemented `MAX_CLEANUPS_PER_RUN` environment variable to limit the number of tunnels cleaned per cron run, defaulting to 10 to comply with Cloudflare's subrequest limits. - Updated the scheduled cleanup job to handle errors per tunnel, ensuring one failure does not halt the entire cleanup process. - Enhanced CHANGELOG to document the new feature and improvements in error handling during cleanup. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 01:38:09 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nport#16
No description provided.