How does nginx + django refresh the web page automatically when nginx502?

configure a website with nginx + django. There are a lot of requests for the website. There will be 502 bad every time you refresh the page dozens of times. If you want to use a temporary solution, when the nginx only returns 502, automatically refresh the URL. How to write it in nginx? The following is the current nginx configuration file:

server {
    charset utf-8;
    listen 80;
    server_name www.yourdomain.com; 

    location /static { 
        alias /home/wangqidan/sites/www.yourdomain.com/yourdomain/static; 
    }

    location / { 
        proxy_set_header Host $host;
        proxy_pass http://unix:/tmp/www.yourdomain.com.socket;
    }
}
Apr.11,2021

customize the 502 page
then write JS refresh


this is impossible, let's see how to solve the 502 error


depends on the nginx error log, to see if it is a socket problem.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf4a7e-31690.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf4a7e-31690.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?