What have you found for these years?

2008-08-23

奇怪的空白 404 error

之前樂多朋友就常常發生整頁變成空白的頁面,我一直搞不懂為什麼。

由於 friends 的 response time 常常很長,也有好幾個 request 往往會造成排隊,
我一直以為是 firefox timeout 了這個 request. 曾經尋找過 firefox 要怎麼把
timeout 時間延長。不過在 about:config 中又看到 timeout 似乎是 300 秒,
這樣無論如何應該都夠長才對...

對於這個問題我一直感到很困擾,因為完全不懂為什麼啊 @_@
要怪人也不知道從何怪起才對...

不過就在剛才我注意到 github 也同樣有這個問題!
而且就在前一陣子我發現 gitbub response time 也變得很長之後。
然而空白頁是一瞬間就出來的,這樣看起來絕對不是 firefox timeout 掉了。

我為了觀察到底是什麼問題,連續 curl 了好幾次 github,
終於抓到兩次(出現機率大約是 5% ~ 10% 左右?很高耶...):


godfat ~> curl -v http://github.com/sam/dm-core/wikis
* About to connect() to github.com port 80 (#0)
* Trying 65.74.177.129... connected
* Connected to github.com (65.74.177.129) port 80 (#0)
> GET /sam/dm-core/wikis HTTP/1.1
> User-Agent: curl/7.18.2 (i386-apple-darwin9.4.0) libcurl/7.18.2 OpenSSL/0.9.8h zlib/1.2.3 libssh2/0.18
> Host: github.com
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Server: nginx/0.6.31
< Date: Sat, 23 Aug 2008 08:02:59 GMT
< Connection: keep-alive
< Content-Length: 0
<
* Connection #0 to host github.com left intact
* Closing connection #0



godfat ~> curl -v http://github.com/rails/rails/tree/master/.gitignore
* About to connect() to github.com port 80 (#0)
* Trying 65.74.177.129... connected
* Connected to github.com (65.74.177.129) port 80 (#0)
> GET /rails/rails/tree/master/.gitignore HTTP/1.1
> User-Agent: curl/7.18.2 (i386-apple-darwin9.4.0) libcurl/7.18.2 OpenSSL/0.9.8h zlib/1.2.3 libssh2/0.18
> Host: github.com
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Server: nginx/0.6.31
< Date: Sat, 23 Aug 2008 08:10:33 GMT
< Connection: keep-alive
< Content-Length: 0
<
* Connection #0 to host github.com left intact
* Closing connection #0


也就是說,server 確實傳回來一個空白頁,
content-length 也是 0, 狀態則是 404 !!!! @_@

不知道 github 是用 mongrel 還是 thin?
看起來像是用 nginx 當 load balancer, 這個組合真的好 popular 喔... XD
但樂多不是用 nginx, 所以這部份我想應該不是 nginx 的問題,
應該是後端的 ruby server. friends 最早是用 mongrel,
後來換成 thin, 現在則又換回 mongrel. 我不記得用 thin 時有沒有這個問題...
只是因為覺得 thin 不夠穩,所以又換回 mongrel. 但現在看起來有再換 thin 實驗的必要?

這個問題感覺實在很神秘,而且開始讓我很懷疑 ruby/ruby on rails/mongrel 等等,
真的夠穩定,拿來跑流量極大的 service??? 總不能一天到晚重啟 server 吧...

any thought?

0 retries:

Post a Comment

Note: Only a member of this blog may post a comment.



All texts are licensed under CC Attribution 3.0