Magento索引页面太慢,而所有内页都快速运行

时间:2015-04-30 14:35:24

标签: php magento magento-1.9 magento-1.9.1

我正在处理索引页面加载速度过慢但所有内页都快速运行的网站。

This显示“等待”时间最长,但我认为如果网站上出现任何问题,那么内页如何才能正常工作?我正在使用 Magento 1.9 。我已经尝试过谷歌提供的各种方式来提高网站的速度。

1 个答案:

答案 0 :(得分:1)

curl -o /dev/null -w "Connect: %{time_connect} TTFB: %{time_starttransfer} Total time: %{time_total} \n" http://toolsandgear.com.au

Connect: 0,179 TTFB: 9,287 Total time: 10,188

TTFB超过9秒。这太长了 - 这意味着你有TTFB(Time To First Byte)问题。在大多数情况下,TTFB问题属于错误的服务器设置或服务器端页面生成期间的开销(页面上太多的硬SQL查询等)。更详细:

time curl http://toolsandgear.com.au/ -v --output /dev/null

 % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 108.167.181.160...
* Connected to toolsandgear.com.au (108.167.181.160) port 80 (#0)
> GET / HTTP/1.1
> Host: toolsandgear.com.au
> User-Agent: curl/7.42.0
> Accept: */*
> 
  0     0    0     0    0     0      0      0 --:--:--  0:00:09 --:--:--     0< HTTP/1.1 200 OK
< Server: nginx/1.6.2
< Date: Thu, 30 Apr 2015 16:19:47 GMT
< Content-Type: text/html; charset=UTF-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< Pragma: no-cache
< X-Frame-Options: SAMEORIGIN
< Set-Cookie: frontend=b024b8022ebb90a78afff9ccdb472764; expires=Thu, 30-Apr-2015 17:19:37 GMT; path=/; domain=toolsandgear.com.au; HttpOnly
< Set-Cookie: sns_furni_tpl=sns_furni; expires=Tue, 19-Apr-2016 16:19:37 GMT; path=/
< 
{ [9577 bytes data]
100  217k    0  217k    0     0  20380      0 --:--:--  0:00:10 --:--:-- 60239
* Connection #0 to host toolsandgear.com.au left intact

real    0m10.917s
user    0m0.017s
sys     0m0.007s

常见的Nginx设置似乎没问题。尝试优化Nginx配置(缓存/ gzip压缩)和配置文件Magento主页以捕获长SQL查询,循环周期等。