[解法]Nginx出現413 Request Entity Too Large
client_max_body_size 20m;
=>Apache找httpd.conf改就好了…
php.ini的記得也開一下好了…
client_max_body_size 20m;
=>Apache找httpd.conf改就好了…
php.ini的記得也開一下好了…
durationA string or number determining how long the animation will run.
callbackA function to call once the animation is complete.
.fadeIn( [ duration ], [ callback ] )
durationA string or number determining how long the animation will run.
callbackA function to call once the animation is complete.
http://blog.longwin.com.tw/archives/000513.html
在 apache 本身的套件中, 有個叫 ab(ApacheBench) 的程式.
ApacheBench 主要是用來測試 apache 執行效率.
ab 參數:Usage: /usr/sbin/ab [options] [http[s]://]hostname[:port]/pathOptions are: -n requests Number of requests to perform -c concurrency Number of multiple requests to make -t timelimit Seconds to max. wait for responses -p postfile File containg data to POST -T content-type Content-type header for POSTing -v verbosity How much troubleshooting info to print -w Print out results in HTML tables -i Use HEAD instead of GET -x attributes String to insert as table attributes -y attributes String to insert as tr attributes -z attributes String to insert as td or th attributes -C attribute Add cookie, eg. 'Apache=1234' (repeatable) -H attribute Add Arbitrary header line, eg. 'Accept-Encoding: zop' Inserted after all normal header lines. (repeatable) -A attribute Add Basic WWW Authentication, the attributes are a colon separated username and password. -P attribute Add Basic Proxy Authentication, the attributes are a colon separated username and password. -X proxy:port Proxyserver and port number to use -V Print version number and exit -k Use HTTP KeepAlive feature -d Do not show percentiles served table. -S Do not show confidence estimators and warnings. -g filename Output collected data to gnuplot format file. -e filename Output CSV file with percentages served -s Use httpS instead of HTTP (SSL) -h Display usage information (this message)ex: 要執行 1000 次的 connection, 20 次的 concurrent (並行, 同時).
語法: ab -n 1000 -c 20 http://localhost/abc.php
產生出來的結果. 主要要注意的是以下幾個.
Time taken for tests: 總共執行花了多久的時間.(以上 1000 次共多久)
Requests per second: 每秒平均可以處理多少個 connection.
參考
http://kiwi.csie.chu.edu.tw/blog/archives/138
AB(Apache Benchmark)數據解讀
ab指令的語法是 ab -c {同時進行的request數量} -t {時間} {url} 或是 ab -c {同時進行的request數量} -n {次數} {url}
ab的測試方式有兩種:
1. -t {秒數}
2. -n {request次數}
兩種方式都可以取得可以觀察的數據,不過如果-n太少的話,就沒有意義。我通常都是使用-t 30或是-t 60。而這樣的測試有另一個好處是,在測試的其中,可以找真的人在一定時間內去實際點點看你的程式,如果時間都過去了(先別跟他講已經跑完了),他還是覺得速度沒有差,那表示效能有到使用者能夠接受的感受。而需要效能數據,其實也是為了使用經驗法則推算出應用程式最多可以容納幾個使用者註冊。
以下舉個一個例子來解讀:
[root@dsa1 ~]# ab -c 20 -t 30 http://some.machine.com/test/
#這裡是版權宣告
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking xxx (be patient)
#這裡會將完成的req次數顯示出來,如果每超過5000會再次顯示
Finished 1028 requests
#主機資訊
Server Software: Apache/2.2.3
Server Hostname: xxx
Server Port: 80
Document Path: /test/
#要注意,如果傳輸的資料大小超過1MB,表示使用ADSL的人多少會因為資料量感受到緩慢
#,就可能不會是準確的測試結果
Document Length: 8943 bytes
#這裡表示你下了 -c 20
Concurrency Level: 20
#總測試時間,應該不會跟-t的時間差太遠
Time taken for tests: 30.27095 seconds
Complete requests: 1028
#這裡的Fail表示在TCP階段就連線失敗,如果fail太多次,出來的數據絕對不正確
Failed requests: 0
Write errors: 0
Total transferred: 9478392 bytes
HTML transferred: 9197475 bytes
#每秒鐘的Request次數,可以視為效能的指標。因為這次測試我們使用了-c 20
#表示在20個人同時連線的情況下,還可以保持每秒34個request。
Requests per second: 34.24 [#/sec] (mean)
#表示這20個人裡「平均」每個人感受到的回應時間(不包括瀏覽器顯示出來的時間)
#約是584ms,也就是0.58秒。
Time per request: 584.185 [ms] (mean)
Time per request: 29.209 [ms] (mean, across all concurrent requests)
Transfer rate: 308.25 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 49 382.7 0 3000
Processing: 91 519 1287.7 262 20913
Waiting: 90 518 1287.7 260 20912
Total: 91 569 1542.9 262 21543
#這個曲線圖比較重要,算是ab的數據價值所在。這裡表示了這20個人所感受到的
#回應速度曲線,可以從0.2秒到21秒不等。也就是說,在這裡約有20*90%=18人,
#他們感受到的速度會低於1秒,而其他人會高於1秒。這個比平均數值還要更能表達
#使用者大多都是感受到什麼速度,因為在伺服器很忙碌的情況下,會有像21秒這種
#數值,這是會大大地拖累平均速度及每秒request數。
Percentage of the requests served within a certain time (ms)
50% 262
66% 327
75% 397
80% 449
90% 730
95% 1338
98% 5224
99% 8504
100% 21543 (longest request)
做驗證碼的更新時
記得在.php後加入&date=<?php print time();?>
這樣比較不會被cache住而造成驗證碼不會更新
改天再把code貼上來
| 網路串流格式 | wmv | rm | mov |
| 出版公司 | Microsoft | RealNetworks | Apple |
| 觀賞端 播放軟體 | Windows Media Player (免費),內建於Windows作業平台 | Basic Real Player(免費),須下載安裝 | QuickTime Player(試用版免費),須下載安裝 |
| 製作端 編碼/轉檔軟體 | Windows Media Encoder(免費) | Real Producer Basic (免費) | QuickTime Pro (US$29.99) |
Server端 | Windows Media Server (免費) | Basic Real Server(免費) | QuickTime Streaming Server(免費; 內含於Mac OS X Server) |
Quantcast先前的投資方Polaris Venture Partners共同牽頭了此輪投資,增持了Quantcast股權;參加此輪融資還有Quantcast先前投資方Founders Fund和Revolution Ventures。
Quantcast計劃將這些新資本用于支持旗下的媒體項目。Quantcast在去年6月推出了媒體項目,意在給廣告行業提供一個可升級、可尋址的媒體平台,提供一個標准化的測量、組織、購買和銷售實時受眾的手段。(逸飛)
最近在研究一些美國網站時
發現了Quantcast這個網站
又學到不少的概念了…
![]()
來源:http://www.nownews.com/2007/07/16/516-2126874.htm
| 網路追追追/麻辣小龍蝦千萬不能吃? | ||
2007/07/16 12:55 |