Skip to content

Commit 365c0cd

Browse files
authored
Wait nginx to be ready first when API's starting (#1844)
1 parent 3d30478 commit 365c0cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/cortex/serve/poll/readiness.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
while true; do
1818
procs_ready="$(ls /mnt/workspace/proc-*-ready.txt 2>/dev/null | wc -l)"
19-
if [ "$CORTEX_PROCESSES_PER_REPLICA" = "$procs_ready" ]; then
19+
if [ "$CORTEX_PROCESSES_PER_REPLICA" = "$procs_ready" ] && curl --silent "localhost:${CORTEX_SERVING_PORT}/nginx_status" >/dev/null; then
2020
touch /mnt/workspace/api_readiness.txt
2121
break
2222
fi

0 commit comments

Comments
 (0)