Hello!
On Thu, Mar 20, 2014 at 8:04 AM, James Marlowe wrote:
> After posting that I see that setting it like proxy_connect_timeout 250ms;
> works.
>
Yes, this is the right syntax.
And don't forget to configure proxy_send_timeout and
proxy_read_timeout at the same time. Otherwise you're only limiting
the connection establishing time.
> Now I also see lua_socket_connect_timeout which might make more sense since
> I am calling the proxy location from a ngx.location.capture (assuming that
> imposes the limit like I would expect). Maybe I should use both so that the
> nginx process to connect to the remote ends and the lua process to connect
> to the local url ends?
>
NGINX subrequests do not have timeout mechanism themselves and they do
not involve any socket operations on their own. NGINX subrequests are
C function calls per se.
So lua_socket_connect_timeout has nothing to do with ngx.location.capture*.
Regards,
-agentzh