Problem Description
When capture_live_filter or capture_live_set_enabled times out, the timeout cascades and crashes the entire MCP server connection. Subsequent calls to unrelated tools (e.g., collection_list) also fail with "MCP server unreachable".
Critical finding: This also reproduces with 0 records after a full app restart — the issue is not solely caused by large record sets.
Root Cause Analysis
From the source code in lib/api/client.dart:
_httpClient.connectionTimeout = const Duration(seconds: 5);
The ReqableApiClient only sets connectionTimeout (5s) but does not set any read/response timeout on the HttpClient. This means:
- When Reqable's local API is slow or stuck, the HTTP request hangs indefinitely
- The MCP server blocks on the
await in _send() and cannot process any other requests
- The MCP host (e.g., Hermes, Claude Desktop) has its own timeout (typically 30-300s), after which it marks the entire MCP server as "unreachable"
- Since the MCP server is stuck on the hung request, all subsequent tool calls fail — even unrelated ones
Steps to Reproduce
Scenario A: Large record set
- Connect to Reqable MCP server via stdio
- Start live capture in Reqable and accumulate 3000+ records
- Call
capture_live_filter with any filter
- After timeout, try calling any other tool (e.g.,
collection_list)
- Result: All subsequent calls fail with "MCP server unreachable" for ~45-50 seconds
Scenario B: Clean restart (0 records)
- Fully quit and restart the Reqable app (clear all records)
- Reconnect MCP (
hermes mcp test reqable → success, 46 tools)
- Call
capture_live_filter(filters: []) (empty filter, 0 records)
- Still times out at 300s, then cascades to crash the entire MCP connection
Additional Observations
capture_live_set_enabled(true) also hangs when Reqable is processing heavy traffic
- The cascading failure means a single slow live capture operation can take down the entire MCP server for all tool categories (collections, REST, scripts, etc.)
- Restarting the Reqable app does NOT reliably fix the issue — the local API server may enter a persistent bad state
hermes mcp test reqable succeeds (46 tools discovered, ~150ms), confirming stdio transport is healthy; the hang is in the Reqable local API layer
Possible Causes (beyond missing timeout)
- Reqable's local API server enters a bad state after the first timeout and doesn't recover on app restart (stale socket/lock)
- The MCP server's
HttpClient keeps a persistent connection that becomes stale
- A Reqable-side lock/mutex is not released after an interrupted request
Suggested Fix
Add a request-level timeout to the HttpClient in ReqableApiClient:
_httpClient.connectionTimeout = const Duration(seconds: 5);
_httpClient.idleTimeout = const Duration(seconds: 30); // or configurable
Or wrap the _send() method with a timeout:
Future<String> _send(String method, Request req) async {
// ... existing code ...
return await _doSend(method, req).timeout(
const Duration(seconds: 30),
onTimeout: () => throw TimeoutException('Request to ${req.route} timed out'),
);
}
This would prevent a single slow request from blocking the entire MCP server.
Environment
- macOS 15 (Apple Silicon)
- Reqable MCP Server (latest, stdio transport)
- Reqable App (latest)
- MCP Host: Hermes Agent
Problem Description
When
capture_live_filterorcapture_live_set_enabledtimes out, the timeout cascades and crashes the entire MCP server connection. Subsequent calls to unrelated tools (e.g.,collection_list) also fail with "MCP server unreachable".Critical finding: This also reproduces with 0 records after a full app restart — the issue is not solely caused by large record sets.
Root Cause Analysis
From the source code in
lib/api/client.dart:The
ReqableApiClientonly setsconnectionTimeout(5s) but does not set any read/response timeout on theHttpClient. This means:awaitin_send()and cannot process any other requestsSteps to Reproduce
Scenario A: Large record set
capture_live_filterwith any filtercollection_list)Scenario B: Clean restart (0 records)
hermes mcp test reqable→ success, 46 tools)capture_live_filter(filters: [])(empty filter, 0 records)Additional Observations
capture_live_set_enabled(true)also hangs when Reqable is processing heavy traffichermes mcp test reqablesucceeds (46 tools discovered, ~150ms), confirming stdio transport is healthy; the hang is in the Reqable local API layerPossible Causes (beyond missing timeout)
HttpClientkeeps a persistent connection that becomes staleSuggested Fix
Add a request-level timeout to the
HttpClientinReqableApiClient:Or wrap the
_send()method with a timeout:This would prevent a single slow request from blocking the entire MCP server.
Environment