mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-14 03:33:43 +08:00
fix(mcp): raise default tool read timeout from 30s to 60s (#247)
This commit is contained in:
parent
9f02a0a221
commit
c92bfa1f12
@ -68,7 +68,7 @@ public class McpServerService {
|
|||||||
entity.setConnectTimeoutSeconds(30);
|
entity.setConnectTimeoutSeconds(30);
|
||||||
}
|
}
|
||||||
if (entity.getReadTimeoutSeconds() == null) {
|
if (entity.getReadTimeoutSeconds() == null) {
|
||||||
entity.setReadTimeoutSeconds(30);
|
entity.setReadTimeoutSeconds(60);
|
||||||
}
|
}
|
||||||
entity.setLastStatus("disconnected");
|
entity.setLastStatus("disconnected");
|
||||||
entity.setToolCount(0);
|
entity.setToolCount(0);
|
||||||
|
|||||||
@ -547,7 +547,7 @@ VALUES (
|
|||||||
NULL,
|
NULL,
|
||||||
FALSE,
|
FALSE,
|
||||||
30,
|
30,
|
||||||
30,
|
60,
|
||||||
'disconnected',
|
'disconnected',
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
@ -578,7 +578,7 @@ VALUES (
|
|||||||
NULL,
|
NULL,
|
||||||
FALSE,
|
FALSE,
|
||||||
30,
|
30,
|
||||||
30,
|
60,
|
||||||
'disconnected',
|
'disconnected',
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
|
|||||||
@ -596,7 +596,7 @@ VALUES (
|
|||||||
NULL,
|
NULL,
|
||||||
FALSE,
|
FALSE,
|
||||||
30,
|
30,
|
||||||
30,
|
60,
|
||||||
'disconnected',
|
'disconnected',
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
@ -627,7 +627,7 @@ VALUES (
|
|||||||
NULL,
|
NULL,
|
||||||
FALSE,
|
FALSE,
|
||||||
30,
|
30,
|
||||||
30,
|
60,
|
||||||
'disconnected',
|
'disconnected',
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
|
|||||||
@ -593,7 +593,7 @@ VALUES (
|
|||||||
NULL,
|
NULL,
|
||||||
FALSE,
|
FALSE,
|
||||||
30,
|
30,
|
||||||
30,
|
60,
|
||||||
'disconnected',
|
'disconnected',
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
@ -624,7 +624,7 @@ VALUES (
|
|||||||
NULL,
|
NULL,
|
||||||
FALSE,
|
FALSE,
|
||||||
30,
|
30,
|
||||||
30,
|
60,
|
||||||
'disconnected',
|
'disconnected',
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
|
|||||||
@ -548,7 +548,7 @@ VALUES (
|
|||||||
NULL,
|
NULL,
|
||||||
FALSE,
|
FALSE,
|
||||||
30,
|
30,
|
||||||
30,
|
60,
|
||||||
'disconnected',
|
'disconnected',
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
@ -579,7 +579,7 @@ VALUES (
|
|||||||
NULL,
|
NULL,
|
||||||
FALSE,
|
FALSE,
|
||||||
30,
|
30,
|
||||||
30,
|
60,
|
||||||
'disconnected',
|
'disconnected',
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
|
|||||||
@ -0,0 +1,8 @@
|
|||||||
|
-- Raise the default per-request (read) timeout for MCP servers from 30s to 60s.
|
||||||
|
-- A 30s ceiling cut off MCP tools whose single callTool round-trip legitimately
|
||||||
|
-- runs longer (data-heavy or compute-heavy tools), surfacing as a request timeout
|
||||||
|
-- with no retry. The application layer already falls back to 60s when the column
|
||||||
|
-- is null; this aligns the schema default so the value is consistent everywhere.
|
||||||
|
-- Only changes the column default for newly inserted rows — existing rows keep
|
||||||
|
-- whatever value they were given. Idempotent.
|
||||||
|
ALTER TABLE mate_mcp_server ALTER COLUMN read_timeout_seconds SET DEFAULT 60;
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
-- Raise the default per-request (read) timeout for MCP servers from 30s to 60s.
|
||||||
|
-- A 30s ceiling cut off MCP tools whose single callTool round-trip legitimately
|
||||||
|
-- runs longer (data-heavy or compute-heavy tools), surfacing as a request timeout
|
||||||
|
-- with no retry. The application layer already falls back to 60s when the column
|
||||||
|
-- is null; this aligns the schema default so the value is consistent everywhere.
|
||||||
|
-- Only changes the column default for newly inserted rows — existing rows keep
|
||||||
|
-- whatever value they were given. Idempotent.
|
||||||
|
ALTER TABLE mate_mcp_server ALTER COLUMN read_timeout_seconds SET DEFAULT 60;
|
||||||
@ -189,7 +189,7 @@ function hydrateFromServer(s: McpServer) {
|
|||||||
envJson: s.envJson || '',
|
envJson: s.envJson || '',
|
||||||
cwd: s.cwd || '',
|
cwd: s.cwd || '',
|
||||||
connectTimeoutSeconds: s.connectTimeoutSeconds || 30,
|
connectTimeoutSeconds: s.connectTimeoutSeconds || 30,
|
||||||
readTimeoutSeconds: s.readTimeoutSeconds || 30,
|
readTimeoutSeconds: s.readTimeoutSeconds || 60,
|
||||||
enabled: s.enabled,
|
enabled: s.enabled,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -63,7 +63,7 @@ export function emptyMcpForm(): McpServerForm {
|
|||||||
envJson: '',
|
envJson: '',
|
||||||
cwd: '',
|
cwd: '',
|
||||||
connectTimeoutSeconds: 30,
|
connectTimeoutSeconds: 30,
|
||||||
readTimeoutSeconds: 30,
|
readTimeoutSeconds: 60,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user