increase tunnel client pool size and keepalive interval#474
Open
kcoopermiller wants to merge 2 commits intomainfrom
Open
increase tunnel client pool size and keepalive interval#474kcoopermiller wants to merge 2 commits intomainfrom
kcoopermiller wants to merge 2 commits intomainfrom
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: New
_kill_processduplicates existing process-killing logicsync_stopand_cleanupnow call_kill_process, removing duplicated terminate/wait/kill logic and centralizing process shutdown behavior.
Or push these changes by commenting:
@cursor push 64eafec117
Preview (64eafec117)
diff --git a/packages/prime-tunnel/src/prime_tunnel/tunnel.py b/packages/prime-tunnel/src/prime_tunnel/tunnel.py
--- a/packages/prime-tunnel/src/prime_tunnel/tunnel.py
+++ b/packages/prime-tunnel/src/prime_tunnel/tunnel.py
@@ -275,18 +275,7 @@
if not self._started:
return
- if self._process is not None:
- try:
- self._process.terminate()
- try:
- self._process.wait(timeout=5)
- except subprocess.TimeoutExpired:
- self._process.kill()
- self._process.wait(timeout=2)
- except Exception:
- pass
- finally:
- self._process = None
+ self._kill_process()
if self._tunnel_info is not None:
try:
@@ -314,18 +303,7 @@
async def _cleanup(self) -> None:
"""Clean up tunnel resources."""
# Stop frpc process (this will cause drain threads to exit via EOF)
- if self._process is not None:
- try:
- self._process.terminate()
- try:
- self._process.wait(timeout=5)
- except subprocess.TimeoutExpired:
- self._process.kill()
- self._process.wait(timeout=2)
- except Exception:
- pass
- finally:
- self._process = None
+ self._kill_process()
# Delete tunnel registration
if self._tunnel_info is not None:This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.
JannikSt
approved these changes
Mar 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Note
Low Risk
Low risk configuration tuning, but the larger connection pool may increase client/server resource usage and could impact connection behavior under load.
Overview
Adjusts the generated
frpcclient config to use a longer TCP mux keepalive interval (30s�60s) and a larger connection pool (10�50) for Prime Tunnel connections.Written by Cursor Bugbot for commit 893bbdb. This will update automatically on new commits. Configure here.