llm timeout 문제
This commit is contained in:
+1
-15
@@ -34,7 +34,6 @@ import java.util.Optional;
|
||||
public class StrategyEvaluationTa4jDiagnosticsService {
|
||||
|
||||
private static final int MAX_RULE_JSON_CHARS = 8_000;
|
||||
private static final int MAX_TRACE_LINES = 100;
|
||||
|
||||
private final LiveConditionStatusService liveConditionStatusService;
|
||||
private final GcStrategyRepository strategyRepo;
|
||||
@@ -176,21 +175,8 @@ public class StrategyEvaluationTa4jDiagnosticsService {
|
||||
block.put("descriptorJson", truncate(ComponentSerialization.toJson(descriptor), MAX_RULE_JSON_CHARS));
|
||||
}
|
||||
|
||||
java.util.List<String> traceLines;
|
||||
boolean satisfied;
|
||||
try (Ta4jRuleTraceCapture capture = Ta4jRuleTraceCapture.open()) {
|
||||
satisfied = capture.evaluateWithTrace(rule, evalIndex, null);
|
||||
traceLines = capture.lines();
|
||||
}
|
||||
boolean satisfied = rule.isSatisfied(evalIndex, null);
|
||||
block.put("satisfiedAtEvalIndex", satisfied);
|
||||
ArrayNode traceArr = block.putArray("evaluationTraceLog");
|
||||
int n = Math.min(traceLines.size(), MAX_TRACE_LINES);
|
||||
for (int i = 0; i < n; i++) {
|
||||
traceArr.add(traceLines.get(i));
|
||||
}
|
||||
if (traceLines.isEmpty()) {
|
||||
block.put("traceNote", "TRACE 로그 없음 — logback TRACE 미활성 또는 Rule trace 미지원");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
block.put("buildError", e.getMessage());
|
||||
}
|
||||
|
||||
@@ -117,5 +117,7 @@ services:
|
||||
volumes:
|
||||
# Desktop updater latest.json·설치 파일 — Jenkins publish + nginx reload
|
||||
- ./frontend/public/desktop/updates:/usr/share/nginx/html/desktop/updates:ro
|
||||
# nginx 타임아웃 등 프록시 설정 — 재빌드 없이 reload 로 반영 가능
|
||||
- ./frontend/nginx-locations.inc:/etc/nginx/gc-locations.inc:ro
|
||||
networks:
|
||||
- goldenchart-net
|
||||
|
||||
@@ -23,21 +23,34 @@
|
||||
chunked_transfer_encoding on;
|
||||
}
|
||||
|
||||
# ── LLM / AI 검증 (Ta4j 재평가 + LLM 최대 120s — 일반 /api/ 60s 초과) ───
|
||||
location ~ ^/api/strategy/evaluation/(ai-verify|llm-test)$ {
|
||||
# ── LLM / AI 검증 (Ta4j 재평가 + LLM — exact match, 일반 /api/ 60s 회피) ───
|
||||
location = /api/strategy/evaluation/ai-verify {
|
||||
proxy_pass http://backend:8080;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_connect_timeout 30s;
|
||||
proxy_read_timeout 300s;
|
||||
proxy_send_timeout 300s;
|
||||
proxy_connect_timeout 60s;
|
||||
proxy_read_timeout 600s;
|
||||
proxy_send_timeout 600s;
|
||||
proxy_buffering off;
|
||||
client_max_body_size 16m;
|
||||
}
|
||||
|
||||
location = /api/strategy/evaluation/llm-test {
|
||||
proxy_pass http://backend:8080;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_connect_timeout 60s;
|
||||
proxy_read_timeout 600s;
|
||||
proxy_send_timeout 600s;
|
||||
proxy_buffering off;
|
||||
}
|
||||
|
||||
# ── GoldenChart Spring Boot Backend 프록시 ────────────────────────
|
||||
location /api/ {
|
||||
proxy_pass http://backend:8080;
|
||||
@@ -49,8 +62,8 @@
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_connect_timeout 10s;
|
||||
proxy_read_timeout 60s;
|
||||
proxy_send_timeout 60s;
|
||||
proxy_read_timeout 180s;
|
||||
proxy_send_timeout 180s;
|
||||
proxy_buffering off;
|
||||
}
|
||||
|
||||
|
||||
@@ -1749,7 +1749,7 @@ export async function fetchStrategyEvaluationAiVerify(
|
||||
cache: 'no-store',
|
||||
body: JSON.stringify({ context }),
|
||||
},
|
||||
200_000,
|
||||
620_000,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1768,7 +1768,7 @@ export async function fetchLlmConnectionTest(): Promise<LlmConnectionTestRespons
|
||||
method: 'POST',
|
||||
cache: 'no-store',
|
||||
},
|
||||
130_000,
|
||||
620_000,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,8 @@
|
||||
flush_interval -1
|
||||
transport http {
|
||||
read_timeout 600s
|
||||
write_timeout 600s
|
||||
versions 1.1 2
|
||||
}
|
||||
header_up Host {host}
|
||||
header_up X-Real-IP {remote_host}
|
||||
|
||||
Reference in New Issue
Block a user