variable proxy_read_timeout ?

Brice Figureau brice+nginx at
Mon May 28 14:18:20 MSD 2007


Running nging 0.5.16 it seems impossible to write something like this:

server {
 set $read_timeout 90;

  if ( $query_string ~* special-paramater ) {
	set $read_timeout 1200;

  location ~* .+\.php$ {
	proxy_read_timeout $read_timeout;

Nginx complains with: 
2007/05/28 12:05:33 [emerg] 22267#0: the "proxy_read_timeout" directive
invalid value in /etc/nginx/nginx.conf:155

My problem is that the upstream server can take a quite long time to
answer some queries (long computations).
I don't have the possibility to modify the upstream server to send a few
bytes every read_timeout seconds, and I don't want to have all the
requests to the upstream server with a proxy_read_timeout of 1200s
(because it won't detect unresponsive upstream server then).

Any idea on how I can work-around that ?
Brice Figureau <brice+nginx at>

More information about the nginx mailing list