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