I'm trying to do this:
map $request_uri $php_timeout { default 60s; "~^/slow/process/(?:1|two|three)" 120s; } ... fastcgi_read_timeout $php_timeout;
but nignx -t
gives an error:
nginx: [emerg] "fastcgi_read_timeout" directive invalid value in /etc/nginx/...
Is this simply not possible? docs don't say it's not (or that it is).
Nb. if it's not clear, I have several URLs that are best described by a set of regex tests that require different timeouts. I could write separate location blocks for all of these but that gets messy.
location
for slow scripts120s
for all scripts.