max_excution_time 경고 없애는 방법

max_excution_time경고

별 생각 없이 사용하고 있었는데 max_excution_time이 발생하고 있었다..너무 값이 낮은 상태라고 경고가 나오고 있었다.

.htaccess 파일 옵션 추가

.htaccess 파일은 Apache 웹 서버에서 특정 디렉터리에 대한 설정(Configurations)을 적용하기 위한 분산 설정 파일(Distributed Configuration File) 입니다.

아래 내용 처럼 php_value에 max_execution_time을 300으로 추가해주었다.
파일 위치는 워드프레스 루트 디렉토리에서 .htaccess파일에 편집하면된다.
(docker나 kubernetes환경이 아니면 다르게 설정해야 할 수 있다.)

Kubernetes Ingress 파일 내용

nginx-ingresscontroller를 사용하고 있다.
필요시 annotations에 추가 옵션으로 timeout을 조정 할 수 있다.
(참고로 SSL Offloading 구조라 TLS설정 내용은 없다.)

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: chattiboy-ing
  namespace: wp-chattiboy
  annotations:
    nginx.ingress.kubernetes.io/proxy-connect-timeout: "90s"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "90s"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "90s"
    nginx.ingress.kubernetes.io/fastcgi-read-timeout: "90s"
spec:
  ingressClassName: nginx
  rules:
    - host: chattiboy.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: chattiboy-svc
                port:
                  number: 80
    - host: www.chattiboy.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: chattiboy-svc
                port:
                  number: 80