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

btakita nginx-forum at
Thu Oct 29 04:01:53 MSK 2009


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:

if (-f $document_root/block_writes) {

With this technique, I'm able to hang the request by doing:

touch document_root/block_writes

However if I do:

rm document_root/block_writes

the request is still hung.

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

Thank you,

Posted at Nginx Forum:,17808,17808#msg-17808

More information about the nginx mailing list