我们最近更改了testing生产环境的服务器和主机。 目前我们还在testing,但是我们的http://test.example.com ,有时只是给某些用户显示一个空白页面。 这发生在桌面和移动环境中
我们使用Amazon Route 53 DNS进行DNS,最近又将Rackspace的托pipe服务提供商更改为了Linode。
configuration也有所变化。 Nginx现在位于Apache的静态资产之前。 没有改变的是使用php,mysql,ubuntu。
奇怪的是,99%的时间一切正常,但在某些情况下,我们已经注意到我们的testing人员正在看到一个空白页面。 页面加载,看起来死了,用户什么都看不到。 我没有检查页面源代码,这是我名单上的下一个要做的事情,但是它并没有发生在我身上。
nginx服务器configuration:
server { listen 80; server_name www.testdev.example.com; return 301 $scheme://testdev.example.com$request_uri; } server { listen 80; server_name example.bestride.com; root /srv/www/example.com/public_html; index index.php; location ~* ^.+\.(?:js|css|jpe?g|htc|xml|otf|ttf|eot|woff|gif|png|svg|ico|pdf|html|htm)$ { access_log off; expires 30d; #add_header Vary Accept-Encoding; tcp_nodelay off; open_file_cache max=3000 inactive=120s; open_file_cache_valid 45s; open_file_cache_min_uses 2; open_file_cache_errors off; } location / { try_files $uri @proxy; } location @proxy { include /etc/nginx/proxy_params; proxy_pass http://127.0.0.1:8080; } location ~ /\.ht { deny all; } }
阿帕奇:
<VirtualHost *:8080> ServerAdmin [email protected] ServerName testdev.example.com ServerAlias www.testdev.example.com testdev.example.com DocumentRoot /srv/www/example.com/public_html/ ErrorLog /srv/www/example.com/logs/error.log CustomLog /srv/www/example.com/logs/access.log combined <IfModule mpm_itk_module> AssignUserId webadmin www-data example </IfModule> <IfModule mod_rewrite.c> RewriteEngine On rewritecond %{http_host} ^www.testdev.example.com [nc] rewriterule ^(.*)$ http://testdev.example.com$1 [r=301,nc,qsa] </IfModule> </VirtualHost>
我听说,浏览器cachingDNS容易lookup..blah等等等等。 但是,如果用户看到一个空白页面,用户可能会放弃,这是一个真正的问题。
清除浏览器caching修复了问题,但普通用户不会这样做。
有没有人遇到这样的问题? 有什么build议么?
感谢Brian
你已经完全改变你的环境(DNS提供商,数据中心提供商等)。 在解决空白页问题时,我不会看你的nginxconfiguration,因为离最终用户太远了。
首先能够复制问题并收集数据。 Chrome或IE拥有出色的开发人员工具(F12),可让您在发生问题时logging所有logging及其结果(IE甚至允许您将其logging在XML文件中)。 然后检查什么东西在哪里破坏和工作。
是的,我已经看到随机重置连接。 一旦它是一个过载的防火墙。 另一次是一个错误的保持活动设置的HTTP服务器。 无限广告。 最好从最终用户那里跟踪确切的交易,并从那里开展工作。