On Fri, Mar 05, 2021 at 03:09:34PM +0100, basti wrote:

Hi there,

> Today I had the problem, that nginx run into "504 Gateway Time-out" when the
> first nameserver in /etc/resolv.conf did not answer.
> 
> The php application is query some names (db-server for example).
> 
> Did nginx use nsswitch?

Very roughly: if nginx sees a hostname that matters in the config file,
nginx will use the system resolver at start-up time to turn that into
an IP address, and will never resolve it again.

If nginx instead sees a hostname at request-processing time, it will
use whatever "resolver" was configured in the nginx config file.

http://nginx.org/r/resolver

nginx-at-startup does not use nsswitch directly; it uses your system
resolver, and *that* might use nsswitch -- nginx does not care.

nginx-at-request does not use anything from the system resolver.

And: if the issue is that your php script is doing some name resolution,
then nginx will not be involved in that -- your php will do whatever
your php is configured to do -- probably something that your favourite
search engine will mention when requesting "php hostname resolution".

Cheers,

        f
-- 
Francis Daly        fran...@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to