• Resolved allanext

    (@allanext)


    My sites are behind an nginx reverse proxy, I was getting a lot of

    admin-ajax.php 502 Bad Gateway nginx

    I noticed that:

    2024/02/13 15:25:25 [warn] 196#196: *346692 upstream server temporarily disabled while reading response header from upstream, client: X.Y.W.Z, server: mysite.com, request: "POST /wp-admin/admin-ajax.php HTTP/2.0", upstream: "https://172.18.0.11:80/wp-admin/admin-ajax.php", host: "mysite.com", referrer: "https://mysite.com/wp-admin/upload.php?page=images-to-webp.php&tab=convert"

    2024/02/13 15:25:25 [error] 196#196: *346692 upstream timed out (110: Operation timed out) while reading response header from upstream, client: X.Y.W.Z, server: mysite.com, request: "POST /wp-admin/admin-ajax.php HTTP/2.0", upstream: "https://172.18.0.11:80/wp-admin/admin-ajax.php", host: "mysite.com", referrer: "https://mysite.com/wp-admin/upload.php?page=images-to-webp.php&tab=convert"

    mysite.com X.Y.W.Z - - [13/Feb/2024:15:25:25 +0000] "POST /wp-admin/admin-ajax.php HTTP/2.0" 504 562 "https://mysite.com/wp-admin/upload.php?page=images-to-webp.php&tab=convert" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36"

    2024/02/13 15:25:25 [error] 196#196: *346692 no live upstreams while connecting to upstream, client: X.Y.W.Z, server: mysite.com, request: "POST /wp-admin/admin-ajax.php HTTP/2.0", upstream: "https://mysite.com/wp-admin/admin-ajax.php", host: "mysite.com", referrer: "https://mysite.com/wp-admin/upload.php?page=images-to-webp.php&tab=convert"

    mysite.com X.Y.W.Z - - [13/Feb/2024:15:25:25 +0000] "POST /wp-admin/admin-ajax.php HTTP/2.0" 502 552 "https://mysite.com/wp-admin/upload.php?page=images-to-webp.php&tab=convert" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36"

    Wondering if there’s a better way to code this in order to avoid the timeout.. a solution is to increase the nginx read timeout:

    location / {

    proxy_read_timeout 1800;

                   

    • This topic was modified 1 year ago by allanext.
Viewing 1 replies (of 1 total)
  • Plugin Author kubiq

    (@kubiq)

    Hello,

    when you are converting old images, then each image is different… for big images you will need much more resources, so yes, many times you need to increase some limits on your server to allow it to process that big image.

    It’s up to your server configuration how big image it can process, but there will be always some limitation ofc.

    I don’t think there is anything I can do about this.

Viewing 1 replies (of 1 total)
  • The topic ‘Nginx admin-ajax.php 502 Bad Gateway’ is closed to new replies.