Background:
The invocation Server (C) and remote interface server (S) are in the same data center and accessed through domain names.
C binds the hosts and sets the Intranet IP address of S, which takes dozens of ms.
C. Bind the hosts and set the public IP address of S, which takes dozens of ms.
C does not bind the hosts and directly uses DNS, which takes several hundred ms
The problem seems obvious. It should be a DNS problem.
Okay, let's take a look at which DNS is set on C. Www.2cto.com
Check cat/etc/resolv. conf and find it is 8.8.8.8 ............ Er, slow is reasonable ~
Switch to your DNS server address and try again.
Is it Mao or several hundred ms ???
Run PHP Code directly with CLI ...... Dozens of ms, no problem
Where is the DNS information cached? Verify:
Delete DNS information and try again
Run CLI ...... No, OK
WEB running ...... Sure enough!
So, after modifying DNS, You need to manually restart fastcgi.