Skip to content

Commit a21909b

Browse files
authored
decrease caching TTL in nginx conf and add a delay before removing the read-only mode of a wiki (#2370)
1 parent 5e60f01 commit a21909b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

k8s/helmfile/env/staging/platform-nginx.nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ server {
9393
proxy_set_header X-Original-URI $request_uri;
9494
proxy_cache host_cache;
9595
proxy_cache_key $host;
96-
proxy_cache_valid any 5m;
96+
proxy_cache_valid any 2m;
9797
proxy_ignore_headers Cache-Control;
9898
proxy_ignore_headers Vary;
9999
proxy_set_header Accept-Encoding "";

k8s/jobs/mediawikiUpdate.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ spec:
4646
"http://${PLATFORM_API_BACKEND_HOST}/backend/setWikiDbVersion?domain=${WBS_DOMAIN}&dbVersion=${MW_VERSION}"
4747
log_info "database version updated to ${MW_VERSION}"
4848
curl --fail --location --silent --request PUT \
49+
log_info "Pause for 2 minutes before disabling readOnly mood"
50+
sleep 120
4951
"http://${PLATFORM_API_BACKEND_HOST}/backend/setWikiReadOnly?domain=${WBS_DOMAIN}&readOnly=0"
5052
log_info "readOnly mode will be disabled for ${WBS_DOMAIN}"
5153
else

0 commit comments

Comments
 (0)