Код: Выделить всё
2025/04/08 04:29:25 [crit] 13#13: *293 connect() to unix:/sock/php.sock failed (2: No such file or directory) while connecting to upstream,
nginx:
nginx:
nginx:
nginx: - name: nginx
image: {{.Values.image.nginx.repository}}:{{.Values.image.tag}}
imagePullPolicy: IfNotPresent
lifecycle:
preStop:
exec:
command: [
"/bin/sh", "-c",
# Introduce a delay to the shutdown sequence to wait for the
# pod eviction event to propagate. Then, gracefully shutdown
# nginx.
"sleep 10;",
"/usr/sbin/nginx -s quit;"
,
]
readinessProbe:
httpGet:
path: /online-status
port: 8080
initialDelaySeconds: 35
timeoutSeconds: 4
periodSeconds: 5
successThreshold: 15
failureThreshold: 2
volumeMounts:
- name: php-socket
mountPath: /sock
< /code>
php: < /p>
- name: php
image: {{.Values.image.php.repository}}:{{.Values.image.tag}}
imagePullPolicy: IfNotPresent
securityContext:
capabilities:
add:
- SYS_PTRACE
lifecycle:
preStop:
exec:
command: [
"sh", "-c",
# Introduce a delay to the shutdown sequence to wait for the
# pod eviction event to propagate. Then, gracefully shutdown
# php. The php-fpm children should handle open requests before full shutdown (see process_control_timeout in start.sh)
"sleep 30; kill -QUIT 1",
]
readinessProbe:
exec:
command:
- php
- /var/www/health_check.php
initialDelaySeconds: 15
periodSeconds: 5
timeoutSeconds: 3
volumeMounts:
- name: php-socket
mountPath: /sock
< /code>
Том: < /p>
volumes:
- name: php-socket
emptyDir: {}
< /code>
Я преднамеренно пробовал искусственно повысить inginx container initiallayseconds, но это, похоже, вообще не влияет на 500 -е. Я упускаю что -то глупое? Недавно мы «переехали» в новый кластер GKE. Но я сомневаюсь, что это повлияет на что -нибудь? Версия Kubernetes даже намного выше. В противном случае, ничего особенного не изменилось с нашей стороны, и я бы заметил эту проблему на протяжении многих лет, лол
Подробнее здесь: https://stackoverflow.com/questions/795 ... c-too-soon