Fastcgi mode caches DNS

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.