Welcome! Log In Create A New Profile

Advanced

Using a file as a flag and proxy_pass to hang a server

October 28, 2009 09:01PM
Hello,

I would like to delay proxying a request for a few second, until the server is ready.

To do this, I'm attempting to use recursion:

[code]
if (-f $document_root/block_writes) {
proxy_pass http://127.0.0.1;
break;
}
[/code]


With this technique, I'm able to hang the request by doing:
[code]
touch document_root/block_writes
[/code]


However if I do:
[code]
rm document_root/block_writes
[/code]


the request is still hung.

Am I missing something? How do I get nginx to recheck if the file exists?

Thank you,
Brian
Subject Author Posted

Using a file as a flag and proxy_pass to hang a server

btakita October 28, 2009 09:01PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 304
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready