Tag: apachebench

Apache基准测试multipart / form-data

我正面临一个apache基准post文件的奇怪问题。 我需要强调一个处理文件上传的function。 所以,我搜索了一下,发现了一篇描述如何正确构建post文件的post。 其内容如下: –1234567 Content-Disposition: form-data; name=”user_id” 3 –1234567 Content-Disposition: form-data; name=”file”; filename=”cf_login.png” Content-Type: image/png [base64 encoded file content] –1234567– ab线是这样的: $ ab -c 1 -n 5 -v 4 -T ‘multipart/form-data; boundary=1234567’ -p post_file.txt http://localhost:3000/files 当ab发出请求时,生成的标头如下: INFO: POST header == — POST /files.json/ HTTP/1.0 Content-length: 229 Content-type: multipart/form-data; boundary=simpleboundary Host: localhost:3000 User-Agent: ApacheBench/2.3 Accept: […]

为什么简单的瘦服务器在基准测试时停止响应16500个请求?

可能重复: ‘ab’程序在收到大量请求后会冻结,为什么? 这是一个简单的测试服务器: require ‘rubygems’ require ‘rack’ require ‘thin’ class HelloWorld def call(env) [200, {“Content-Type” => “text/plain”}, “OK”] end end Rack::Handler::Thin.run HelloWorld.new, :Port => 9294 #I’ve tried with these added too, ‘rack.multithread’ => true, ‘rack.multiprocess’ => true 这是一个测试运行: $ ab -n 20000 http://0.0.0.0:9294/sdf This is ApacheBench, Version 2.3 Copyright 1996 Adam Twiss, Zeus Technology Ltd, […]