In my test scenario if a file is being created and someone requests the file 404 will be returned. i want to implement a retry once for that file. current configuration
location /file/ {
root /var/www/html/;
try_files $uri $uri/ @retry;
}
location @retry {
proxy_pass http://127.0.0.1;
}
this works fine for real time file creation and access (if a file returns 404 it retries sort of). but if a file doesn't exists it creates a nested requests (i guess) which will eventually return 503 gateway timeout.
1) is there any better implementation for this ?
2) will nested request also dies when 1st request times out ?