Welcome! Log In Create A New Profile

Advanced

Fastcgi_pass, resolver, and validating functionality.

December 06, 2016 12:43PM
I have an nginx server (1.10.1) configured that sends requests for PHP files to our PHP tier by directing that traffic via fastcgi_pass to our PHP ELB (AWS's Elastic Load Balancer). We occasionally get outages that a hard stop/start of nginx solves, but are having trouble narrowing the issue down. We believe it is related to DNS resolution, which brings me here. I have a few questions:

1) Does using a variable in fastcgi_pass actually allow the resolver to run, or is it just for proxy_pass as I've seen in 90% of examples?

2) Is this configuration valid? It WORKS, but the resolution doesn't seem to do anything, or I'm not sure how to check that it's updating. The server's resolv.conf points to the same DNS server and uses a search domain so "php:9000" does work:

http {
resolver x.x.x.x valid=10s;

server {
set $phproute "php:9000";

location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass $phproute;
}
}
}

3) How do I validate that the resolver is working properly outside of waiting for an outage again? Is there a way to get the current cached DNS entries from nginx to compare? I found a tcpdump command, but I'm not really sure what I'm looking at, and it usually gives me no data. Is there a better method?

Thanks in advance. I'm really at a loss here.
Subject Author Posted

Fastcgi_pass, resolver, and validating functionality.

ahamilton9 December 06, 2016 12:43PM

Re: Fastcgi_pass, resolver, and validating functionality.

Francis Daly December 06, 2016 03:24PM

Re: Fastcgi_pass, resolver, and validating functionality.

ahamilton9 December 07, 2016 03:39PM

Re: Fastcgi_pass, resolver, and validating functionality.

Maxim Dounin December 08, 2016 09:06AM

Re: Fastcgi_pass, resolver, and validating functionality.

ahamilton9 December 22, 2016 11:55AM

Re: Fastcgi_pass, resolver, and validating functionality.

Maxim Dounin December 22, 2016 12:52PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 65
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready