CentOS VirtualBox对http请求的第二个延迟 [英] CentOS VirtualBox 5 second latency on http requests

查看:244
本文介绍了CentOS VirtualBox对http请求的第二个延迟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的OSX 10.8.2机器上运行centos 6.3在VirtualBox 4.2.1内,并遇到一个延迟问题,我不理解。基本上,每个http请求到任何地方有一个额外的5000ms延迟。 Ping没有额外延迟。



  [vagrant @ localhost〜] $ curl -o / dev / null https://google.com -w 
%总%接收%Xferd平均速度时间时间时间当前
载入上传总剩余速度
110 220 110 220 0 0 42 0 0:00:05 0:00:05 - : - : - 7586
[vagrant @ localhost〜] $ curl -o / dev / null https://google.com -w
%总计接收百分比%Xferd平均速度时间时间时间当前
载入上传总剩余速度
110 220 110 220 0 0 42 0 0:00:05 0:00:05 - : - : - 7586
[vagrant @ localhost〜] $ curl -o / dev / null https://google.com -w
%总计接收百分比%Xferd平均速度时间时间时间当前
载入上传总剩余速度
110 220 110 220 0 0 42 0 0:00:05 0:00:05 - : - : - 7857
[vagrant @ localhost〜] $ ping google.com
PING google .com(74.125.224.66)56(84)字节的数据。
64个字节从nuq04s07-in-f2.1e100.net(74.125.224.66):icmp_seq = 1 ttl = 63时间= 7.64 ms
64个字节从nuq04s07-in-f2.1e100.net(74.125 .224.66):icmp_seq = 2 ttl = 63 time = 6.26 ms
来自nuq04s07-in-f2.1e100.net的64个字节(74.125.224.66):icmp_seq = 3 ttl = 63 time = 8.69 ms
64 bytes from nuq04s07-in-f2.1e100.net(74.125.224.66):icmp_seq = 4 ttl = 63 time = 7.89 ms
64 bytes from nuq04s07-in-f2.1e100.net(74.125.224.66): icmp_seq = 5 ttl = 63 time = 5.99 ms
来自nuq04s07-in-f2.1e100.net的64个字节(74.125.224.66):icmp_seq = 6 ttl = 63 time = 8.64 ms

对于记录,我有一个ubuntu 12.04.1虚拟机在同一个VirtualBox / OSX环境,不会遇到这个问题。 / p>

解决方案

确定,问题是DNS问题。



基本上CentOS VirtualBox已配置为使用本身内部的,但可能与我们网络上的某个内容冲突的10.0.2.3 DNS服务器。



在任何情况下,使用不同的DNS服务器解决了问题。


I'm running centos 6.3 inside of VirtualBox 4.2.1 on my OSX 10.8.2 machine, and have encountered a latency issue I do not comprehend. Basically, every http request to anywhere has an additional 5000ms delay. Ping has no additional delay.

[vagrant@localhost ~]$ curl -o /dev/null https://google.com -w ""
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
110   220  110   220    0     0     42      0  0:00:05  0:00:05 --:--:--  7586
[vagrant@localhost ~]$ curl -o /dev/null https://google.com -w ""
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
110   220  110   220    0     0     42      0  0:00:05  0:00:05 --:--:--  7586
[vagrant@localhost ~]$ curl -o /dev/null https://google.com -w ""
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
110   220  110   220    0     0     42      0  0:00:05  0:00:05 --:--:--  7857
[vagrant@localhost ~]$ ping google.com
PING google.com (74.125.224.66) 56(84) bytes of data.
64 bytes from nuq04s07-in-f2.1e100.net (74.125.224.66): icmp_seq=1 ttl=63 time=7.64 ms
64 bytes from nuq04s07-in-f2.1e100.net (74.125.224.66): icmp_seq=2 ttl=63 time=6.26 ms
64 bytes from nuq04s07-in-f2.1e100.net (74.125.224.66): icmp_seq=3 ttl=63 time=8.69 ms
64 bytes from nuq04s07-in-f2.1e100.net (74.125.224.66): icmp_seq=4 ttl=63 time=7.89 ms
64 bytes from nuq04s07-in-f2.1e100.net (74.125.224.66): icmp_seq=5 ttl=63 time=5.99 ms
64 bytes from nuq04s07-in-f2.1e100.net (74.125.224.66): icmp_seq=6 ttl=63 time=8.64 ms

For the record, I have a ubuntu 12.04.1 virtual machine in the same VirtualBox/OSX environment, that does not experience the issue.

解决方案

Ok, it turns out the issue was a DNS issue.

Basically the CentOS VirtualBox was configured to use a 10.0.2.3 DNS server that was internal to itself, but maybe conflicted with something on our network.

In any case, using a different DNS server resolved the issue.

这篇关于CentOS VirtualBox对http请求的第二个延迟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆