feat: add graceful api shutdown readiness
This commit is contained in:
@@ -190,7 +190,7 @@ http {
|
||||
proxy_set_header X-Request-Id $request_id;
|
||||
}
|
||||
|
||||
location ~ ^/(generated-|healthz) {
|
||||
location ~ ^/(generated-|healthz|readyz) {
|
||||
return 404;
|
||||
}
|
||||
|
||||
|
||||
1
deploy/env/api-server.env.example
vendored
1
deploy/env/api-server.env.example
vendored
@@ -11,6 +11,7 @@ GENARRATIVE_API_MAX_CONCURRENT_REQUESTS=512
|
||||
GENARRATIVE_API_GALLERY_MAX_CONCURRENT_REQUESTS=320
|
||||
GENARRATIVE_API_DETAIL_MAX_CONCURRENT_REQUESTS=64
|
||||
GENARRATIVE_API_ADMIN_MAX_CONCURRENT_REQUESTS=16
|
||||
GENARRATIVE_API_SHUTDOWN_OUTBOX_FLUSH_TIMEOUT_MS=5000
|
||||
GENARRATIVE_TRACKING_OUTBOX_ENABLED=true
|
||||
GENARRATIVE_TRACKING_OUTBOX_DIR=/var/lib/genarrative/tracking-outbox
|
||||
GENARRATIVE_TRACKING_OUTBOX_BATCH_SIZE=500
|
||||
|
||||
@@ -215,7 +215,7 @@ server {
|
||||
}
|
||||
|
||||
# 开发服仍不恢复旧生成资源代理和健康检查公网入口。
|
||||
location ~ ^/(generated-|healthz) {
|
||||
location ~ ^/(generated-|healthz|readyz) {
|
||||
return 404;
|
||||
}
|
||||
|
||||
|
||||
@@ -235,7 +235,7 @@ server {
|
||||
}
|
||||
|
||||
# 生产公网不再暴露旧生成资源代理和健康检查入口。
|
||||
location ~ ^/(generated-|healthz) {
|
||||
location ~ ^/(generated-|healthz|readyz) {
|
||||
return 404;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ ExecStart=/opt/genarrative/current/api-server
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
KillSignal=SIGINT
|
||||
TimeoutStopSec=30
|
||||
TimeoutStopSec=90
|
||||
LimitNOFILE=65535
|
||||
TasksMax=2048
|
||||
|
||||
|
||||
Reference in New Issue
Block a user