WordPress数据库错误: [Got error 28 from storage engine]
SHOW FULL COLUMNS FROM `wp_options`

WordPress数据库错误: [Got error 28 from storage engine]
SELECT t.*, tt.*, tr.object_id FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category', 'post_tag', 'post_format') AND tr.object_id IN (50) ORDER BY t.name ASC

tomcat 并发线程 – Crazy knowledge base
Crazy knowledge base

tomcat 并发线程

    
    

    

index.jsp (除了下面这些代码,还有200行html代码,没有一个图片)

<%   
for(int i=0;i<1000;i++){   
   request.setAttribute("key_"+i,"value_"+i);      
}   
  
  
for(int i=0;i<100;i++){   
   request.getSession().setAttribute("key_"+i,"value_"+i);     
}   
%>   

<%=request.getSession().getAttribute("key_0")%> <%=request.getSession().getAttribute("key_0")%> <%=request.getSession().getAttribute("key_0")%> <%=request.getSession().getAttribute("key_0")%> <%=request.getSession().getAttribute("key_0")%> <%=request.getSession().getAttribute("key_0")%>

下面是测试结果:
tomcat + apache 测试结果:

D:\Apache2.2\bin>ab -n 10000 -c 800 http://127.0.0.1/index.jsp   
  
Server Software:        Apache/2.2.4  
Server Hostname:        127.0.0.1  
Server Port:            80  
  
Document Path:          /index.jsp   
Document Length:        41078 bytes   
  
Concurrency Level:      800  
Time taken for tests:   34.46875 seconds   
Complete requests:      10000  
Failed requests:        0  
Write errors:           0  
Total transferred:      413090000 bytes   
HTML transferred:       410780000 bytes   
Requests per second:    293.71 [#/sec] (mean)   
Time per request:       2723.750 [ms] (mean)   
Time per request:       3.405 [ms] (mean, across all concurrent requests)   
Transfer rate:          11848.61 [Kbytes/sec] received   
  
Connection Times (ms)   
              min  mean[+/-sd] median   max   
Connect:        0    0   1.8      0      15  
Processing:    15 2034 3425.1    921   23265  
Waiting:        0 2025 3423.8    921   23250  
Total:         15 2034 3425.1    921   23265  
  
Percentage of the requests served within a certain time (ms)   
  50%    921  
  66%   1343  
  75%   1656  
  80%   1875  
  90%   5078  
  95%   9421  
  98%  15828  
  99%  18171  
 100%  23265 (longest request)   
  
D:\Apache2.2\bin>ab -n 10000 -c 1000 http://127.0.0.1/index.jsp   
  
Server Software:        Apache/2.2.4  
Server Hostname:        127.0.0.1  
Server Port:            80  
  
Document Path:          /index.jsp   
Document Length:        323 bytes   
  
Concurrency Level:      1000  
Time taken for tests:   24.265625 seconds   
Complete requests:      10000  
Failed requests:        3953  
   (Connect: 0, Length: 3953, Exceptions: 0)   
Write errors:           0  
Non-2xx responses:      8686  
Total transferred:      58651479 bytes   
HTML transferred:       56541921 bytes   
Requests per second:    412.11 [#/sec] (mean)   
Time per request:       2426.563 [ms] (mean)   
Time per request:       2.427 [ms] (mean, across all concurrent requests)   
Transfer rate:          2360.38 [Kbytes/sec] received   
  
Connection Times (ms)   
              min  mean[+/-sd] median   max   
Connect:        0    0   1.7      0      15  
Processing:     0 1573 4416.4     31   23984  
Waiting:        0 1563 4402.5     31   23984  
Total:          0 1573 4416.5     31   23984  
  
Percentage of the requests served within a certain time (ms)   
  50%     31  
  66%     62  
  75%     62  
  80%     62  
  90%   7031  
  95%  13234  
  98%  18218  
  99%  19859  
 100%  23984 (longest request)  

tomcat 单独测试结果 (250并发会经常失败,200比较正常,偶尔有少量错误):

D:\Apache2.2\bin>ab -n 1000 -c 250 http://127.0.0.1:8080/index.jsp   
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 127.0.0.1 (be patient)   
Completed 100 requests   
Send request failed!   
Send request failed!   
Send request failed!   
Send request failed!   
Send request failed!   
Completed 200 requests   
Send request failed!   
apr_socket_recv: 远程主机强迫关闭了一个现有的连接。   (730054)   
Total of 223 requests completed   
  
D:\Apache2.2\bin>ab -n 1000 -c 250 http://127.0.0.1:8080/index.jsp   
  
Server Software:        Apache-Coyote/1.1  
Server Hostname:        127.0.0.1  
Server Port:            8080  
  
Document Path:          /index.jsp   
Document Length:        41078 bytes   
  
Concurrency Level:      250  
Time taken for tests:   2.390625 seconds   
Complete requests:      1000  
Failed requests:        0  
Write errors:           0  
Total transferred:      41292000 bytes   
HTML transferred:       41078000 bytes   
Requests per second:    418.30 [#/sec] (mean)   
Time per request:       597.656 [ms] (mean)   
Time per request:       2.391 [ms] (mean, across all concurrent requests)   
Transfer rate:          16867.56 [Kbytes/sec] received   
  
Connection Times (ms)   
              min  mean[+/-sd] median   max   
Connect:        0    0   1.9      0      15  
Processing:   109  575 314.1    515    1218  
Waiting:       62  550 315.0    453    1156  
Total:        109  575 314.1    515    1218  
  
Percentage of the requests served within a certain time (ms)   
  50%    515  
  66%    609  
  75%    921  
  80%   1031  
  90%   1062  
  95%   1125  
  98%   1140  
  99%   1140  
 100%   1218 (longest request) 

单独测试tomcat基本上只能达到240+左右的并发,tomcat+apache 900+并发,如果是静态页面tomcat并发1000+没有任何问题。

tomcat基本上都保持在 20% – 45% 之间 , 内存在 80M — 600M +之间 ,根据并发和请求的大小,内存的变法比较明显,cpu基本保存在这里,apache占用的cpu基本上是在 15% – 40%。

tomcat 并发线程

WordPress数据库错误: [Got error 28 from storage engine]
SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category') AND tr.object_id IN (48) ORDER BY t.name ASC

WordPress数据库错误: [Got error 28 from storage engine]
SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('category') AND tr.object_id IN (51) ORDER BY t.name ASC

滚动到顶部