ข้อผิดพลาดเกตเวย์ไม่ถูกต้อง 502 แสดงเมื่อสลับระหว่างหน้าเว็บไซต์และบางครั้งในหน้าแรก แต่ไม่ใช่สำหรับคำขอแรกในหน้าแรกเป็นเพียงเมื่อมีการเปลี่ยนเส้นทางหน้าอื่นไป และมันเกิดขึ้นสำหรับไฟล์จาวาสคริปต์บางไฟล์
load balancing ถูกกำหนดค่าไว้ใน upstreams สอง php1 php2 ทั้งสองเป็น apache server
เมื่อฉันตรวจสอบบันทึกข้อผิดพลาดที่ฉันชอบ:
no live upstreams while connecting to upstream
[error] 27212#0: *314 no live upstreams while connecting to   upstream, client: ip_address , server: example.com, request: "GET / HTTP/1.1", upstream: "http://example.com", host: "example.com", referrer: "http://example.com/mypages/"
และนี่คือการกำหนดค่าเซิร์ฟเวอร์สมดุลภาระ
  upstream example.com  {
    #  ip_hash;
      server php01 max_fails=3 fail_timeout=15s;
      server php02 max_fails=3 fail_timeout=15s;
    }
    server {
      listen IP:80;
      server_name example.com;
      access_log /var/log/nginx/example.com.access;
      error_log /var/log/nginx/example.com.error error;
     location / {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_pass  http://$server_name/$uri;
        proxy_cache_bypass $cookie_nocache $arg_nocache $arg_comment;
        proxy_cache_bypass $http_pragma $http_authorization;
        proxy_no_cache $cookie_nocache $arg_nocache $arg_comment;
        proxy_no_cache $http_pragma $http_authorization;
      }
    }
ฉันค้นหาเป็นเวลาหลายชั่วโมงและไม่มีประโยชน์ใด ๆ ที่พบว่าสตรีมของฉันอัพและไม่มีปัญหากับพวกเขา