feat(timeout): prevent Cloudflare 524 timeouts on long generations via SSE heartbeats and chunked keep-alives
This commit is contained in:
parent
ba57e3e394
commit
0e83233715
7 changed files with 385 additions and 25 deletions
|
|
@ -10,7 +10,12 @@ export const config = {
|
|||
logDir: process.env.LOG_DIR || './logs',
|
||||
configFilePath: process.env.CONFIG_FILE || path.join(process.cwd(), 'data', 'revolver-config.json'),
|
||||
model: 'gemini-flash-lite-latest',
|
||||
rateLimitDurationMs: parseInt(process.env.RATE_LIMIT_DURATION_MS || '60000', 10)
|
||||
rateLimitDurationMs: parseInt(process.env.RATE_LIMIT_DURATION_MS || '60000', 10),
|
||||
// Cloudflare Anti-Timeout & Keep-Alive settings
|
||||
keepAliveIntervalMs: parseInt(process.env.KEEPALIVE_INTERVAL_MS || '15000', 10),
|
||||
enableNonStreamingKeepAlive: process.env.ENABLE_NON_STREAMING_KEEPALIVE !== 'false',
|
||||
nonStreamingKeepAliveDelayMs: parseInt(process.env.NON_STREAMING_KEEPALIVE_DELAY_MS || '20000', 10),
|
||||
candidateTimeoutMs: parseInt(process.env.CANDIDATE_TIMEOUT_MS || '60000', 10)
|
||||
};
|
||||
|
||||
if (!config.apiPassword) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue