加入收藏 | 设为首页 | 会员中心 | 我要投稿 沧州站长网 (https://www.0317zz.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

linux – 从某些ISP请求需要很长时间

发布时间:2021-05-25 14:47:23 所属栏目:Linux 来源:网络整理
导读:副标题#e# 我们有一台Apache服务器,在虚拟机上运行 PHP.文档根位于用户的主文件夹(/ home / users / {first letter} / {username} /)中,/ home / users /通过NFS挂载. 似乎有些奇怪的事情发生了.当一些用户请求一个文件时(在这个例子中我使用了Hondenbol.pn
副标题[/!--empirenews.page--]

我们有一台Apache服务器,在虚拟机上运行 PHP.文档根位于用户的主文件夹(/ home / users / {first letter} / {username} /)中,/ home / users /通过NFS挂载.

似乎有些奇怪的事情发生了.当一些用户请求一个文件时(在这个例子中我使用了Hondenbol.png),它需要很长时间(起初用户认为它根本没有加载),而对于其他用户(对我来说,在这种情况下),它几乎立即加载.

这是该vHost的Apache日志文件的一部分.我注意到的唯一奇怪的事情是HTTP状态代码之后的数字,据我所知,这是(来自Apache文档);

2326 (%b)
    The last part indicates the size of the object returned to the client,not including the response headers. If no content was returned to the client,this value will be "-". To log "0" for no content,use %B instead.

同一个文件应该有这么大的差异吗?或者这与浏览器缓存有什么关系?

root@web:/var/log/apache2/vhost# cat VHOST_USERNAME_USERNAME.sinners.be.log | grep -i bol
IP_USER - - [09/Sep/2014:17:18:34 +0200] "GET /SUBFOLDER/application/img/Hondenbol200.png HTTP/1.1" 404 544 "http://USERNAME.sinners.be/SUBFOLDER/index.php" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/38.0.2125.44 Safari/537.36"
IP_USER - - [09/Sep/2014:17:20:29 +0200] "GET /SUBFOLDER/application/img/Hondenbol200.png HTTP/1.1" 404 544 "http://USERNAME.sinners.be/SUBFOLDER/index.php" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/38.0.2125.44 Safari/537.36"
IP_USER - - [09/Sep/2014:17:43:45 +0200] "GET /SUBFOLDER/application/img/Hondenbol.png HTTP/1.1" 200 222132 "http://USERNAME.sinners.be/SUBFOLDER/" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/38.0.2125.44 Safari/537.36"
IP_USER - - [10/Sep/2014:17:13:05 +0200] "GET /SUBFOLDER/application/img/Hondenbol.png HTTP/1.1" 200 222131 "http://USERNAME.sinners.be/SUBFOLDER/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/37.0.2062.103 Safari/537.36"
IP_ME - - [20/Sep/2014:13:50:38 +0200] "GET /SUBFOLDER/application/img/Hondenbol.png HTTP/1.1" 200 222130 "http://USERNAME.sinners.be/SUBFOLDER/" "Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0"
IP_ME - - [20/Sep/2014:13:53:23 +0200] "GET /SUBFOLDER/application/img/Hondenbol.png HTTP/1.1" 304 182 "http://USERNAME.sinners.be/SUBFOLDER/" "Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0"
IP_ME - - [20/Sep/2014:13:53:41 +0200] "GET /SUBFOLDER/application/img/Hondenbol.png HTTP/1.1" 200 222131 "http://USERNAME.sinners.be/SUBFOLDER/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/37.0.2062.120 Safari/537.36"
IP_USER - - [20/Sep/2014:13:53:39 +0200] "GET /SUBFOLDER/application/img/Hondenbol.png HTTP/1.1" 200 222131 "http://USERNAME.sinners.be/SUBFOLDER/" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/38.0.2125.66 Safari/537.36"
IP_USER - - [20/Sep/2014:13:53:38 +0200] "GET /SUBFOLDER/application/img/Hondenbol.png HTTP/1.1" 200 222131 "http://USERNAME.sinners.be/SUBFOLDER/" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/38.0.2125.66 Safari/537.36"
RANDOM_IP - - [20/Sep/2014:13:55:17 +0200] "GET /SUBFOLDER/application/img/Hondenbol.png HTTP/1.0" 200 222094 "-" "-"
IP_ME - - [20/Sep/2014:13:56:14 +0200] "GET /SUBFOLDER/application/img/Hondenbol.png HTTP/1.1" 304 183 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/37.0.2062.120 Safari/537.36"
IP_ME - - [20/Sep/2014:13:56:15 +0200] "GET /SUBFOLDER/application/img/Hondenbol.png HTTP/1.1" 304 182 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/38.0.2125.66 Safari/537.36"
IP_ME - - [20/Sep/2014:13:59:58 +0200] "GET /SUBFOLDER/application/img/Hondenbol.png HTTP/1.1" 304 182 "http://USERNAME.sinners.be/SUBFOLDER/" "Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0"
IP_ME - - [20/Sep/2014:14:01:04 +0200] "GET /SUBFOLDER/application/img/Hondenbol.png HTTP/1.1" 200 222131 "http://USERNAME.sinners.be/SUBFOLDER/" "Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0"
IP_ME - - [20/Sep/2014:14:01:38 +0200] "GET /SUBFOLDER/application/img/Hondenbol.png HTTP/1.1" 200 222131 "http://USERNAME.sinners.be/SUBFOLDER/" "Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0"
IP_USER - - [20/Sep/2014:14:02:39 +0200] "GET /SUBFOLDER/application/img/Hondenbol.png HTTP/1.1" 200 222130 "http://USERNAME.sinners.be/SUBFOLDER/" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/38.0.2125.66 Safari/537.36"
IP_USER - - [20/Sep/2014:14:03:17 +0200] "GET /SUBFOLDER/application/img/Hondenbol.png HTTP/1.1" 304 183 "http://USERNAME.sinners.be/SUBFOLDER/" "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/38.0.2125.66 Safari/537.36"

文件:

-rwxr-xr-x  1 USERNAME user 221841 Sep 10 01:22 Hondenbol.png
root@web:~# uname -a
Linux web 3.14-2-amd64 #1 SMP Debian 3.14.15-2 (2014-08-09) x86_64 GNU/Linux
root@web:~# apache2 -v
Server version: Apache/2.4.10 (Debian)
Server built:   Jul 23 2014 13:15:48
root@web:~# php -v
PHP 5.6.0-1 (cli) (built: Aug 28 2014 13:03:02) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0,Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.4-dev,Copyright (c) 1999-2014,by Zend Technologies

我们使用mpm-itk.

更新1

谢谢,@ kasperd.我将%D添加到日志文件中,并找到了同一个问题的同事.我让他(完全)加载有问题的网站几次.

澄清;页面本身加载正常.只是页面上的图像对某些人来说很麻烦,但它们总是相同的图像.

(编辑:沧州站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!