网站用于Firefox慢得令人难以置信,即时在其他浏览器:的KeepAlive问题? [英] Site incredibly slow for firefox, instant on every other browser: KeepAlive issue?

查看:209
本文介绍了网站用于Firefox慢得令人难以置信,即时在其他浏览器:的KeepAlive问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站,一个网页需要10秒与Firefox加载,并且还有10秒加载图像。这是在Apache上运行PHP页面。这些图像只是静态图像。

它优美运行在镀铬....即时加载。

使用Google的答案指出我朝着与养活一个可能的问题和缺少内容长度混乱的Firefox,而事实上,它看起来内容长度不被设置在服务器上无论是静态还是非静态内容,但禁止在服务器上保留活着一倍加载时间!

一些网站建议禁用保持活动的浏览器,但我不愿意推荐给大家,查看该页面!难道我也许找错了树?

浏览器是清醒山猫的Firefox 3.6.8。服务器是Apache的2.2.11。

的apache.conf是apended ......我认为这是出来的箱的一个,虽然我妄图以尝试并获得页面加载端的超时时间减少到3。

我是找错了树?

 的ServerRoot的/ etc / apache2的与LockFile /var/lock/apache2/accept.lock
PIDFILE $ {} APACHE_PID_FILE
超时300
上的KeepAlive
MaxKeepAliveRequests 100
3的KeepAliveTimeout
< IfModule mpm_ prefork_module>
    StartServers的5
    比MinSpareServers 5
    MaxSpareServers的10
    MaxClients的150
    MaxRequestsPerChild 0
< / IfModule>
< IfModule mpm_worker_module>
    StartServers的2
    MaxClients的150
    MinSpareThreads 25
    MaxSpareThreads 75
    ThreadsPerChild的25
    MaxRequestsPerChild 0
< / IfModule>
用户$ {} APACHE_RUN_USER
集团$ {} APACHE_RUN_GROUP
AccessFileName的.htaccess
<文件〜。^ \\ HT>
    为了允许,拒绝
    所有拒绝
< /文件>
缺省的类型文本/纯
HostnameLookups关闭
错误日志/var/log/apache2/error.log
LOGLEVEL警告
包括/etc/apache2/mods-enabled/*.load
包括/etc/apache2/mods-enabled/*.conf
包括/etc/apache2/httpd.conf
包括/etc/apache2/ports.conf
的LogFormat%V:%P%H%L%U%T \\%r \\%> S%B \\%{Referer的}​​ I \\\\%{用户代理} I \\vhost_combined
的LogFormat%H%L%U%T \\%r \\%> S%B \\%{Referer的}​​ I \\\\%{用户代理} I \\组合拳
的LogFormat%H%L%U%T \\%r \\%>%B的共同
的LogFormat%{Referer的}​​ I - >%U引荐
的LogFormat%{用户代理} I代理
的CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined
包括/etc/apache2/conf.d/
包括在/ etc /启用站点-的Apache2 / /


解决方案

这个问题是与当地的DNS查找。该问题是由一个事实,即命令行DNS解析似乎是确定,铬是快如闪电隐藏。原来,铬使用DNS prefetching,不使用本地网络堆栈。这把我完全上了错误的策略。

创建本地绑定服务后,火狐似乎很好地工作。

因此​​,一些观看了相同的平台其他浏览器上运行Chrome时。

I have a site where a page takes 10 seconds to load with firefox, and a further 10 seconds to load the images. It's a php page running on apache. The Images are just static images.

It runs beautifully on chrome.... instant loading.

googling for the answer has pointed me towards a possible issue with keep alive and the lack of content length confusing firefox, and indeed, it appears that content length isn't being set by the server on either the static or non static content, but disabling keep alive on the server doubles the load time!

Some sites have suggested disabling keep alive on the browser, but I'm reluctant to recommend that to everyone that views the page! Am I perhaps barking up the wrong tree?

browser is firefox 3.6.8 on Lucid Lynx. server is Apache 2.2.11.

apache.conf is apended... I think it's the one that comes out of the box, although I reduced the KeepAlive timeout to 3 in a vain attempt to try and get the page to load.

Am I barking up the wrong tree?

ServerRoot "/etc/apache2"

LockFile /var/lock/apache2/accept.lock
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 3
<IfModule mpm_prefork_module>
    StartServers          5
    MinSpareServers       5
    MaxSpareServers      10
    MaxClients          150
    MaxRequestsPerChild   0
</IfModule>
<IfModule mpm_worker_module>
    StartServers          2
    MaxClients          150
    MinSpareThreads      25
    MaxSpareThreads      75 
    ThreadsPerChild      25
    MaxRequestsPerChild   0
</IfModule>
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
AccessFileName .htaccess
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>
DefaultType text/plain
HostnameLookups Off
ErrorLog /var/log/apache2/error.log
LogLevel warn
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf
Include /etc/apache2/httpd.conf
Include /etc/apache2/ports.conf
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined
Include /etc/apache2/conf.d/
Include /etc/apache2/sites-enabled/

解决方案

The issue was with local DNS lookup. The issue was hidden by the fact that command line DNS resolution seemed to be OK, and chrome was lightning fast. Turns out that chrome uses DNS prefetching, which doesn't use the local network stack. This threw me onto completely the wrong tack.

After creating a local bind service, firefox seems to be working nicely.

So something to watch out for when running chrome on the same platform as other browsers.

这篇关于网站用于Firefox慢得令人难以置信,即时在其他浏览器:的KeepAlive问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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