Apache Benchmark

Hi All,

Am using ab(Apache Benchmark) for load test in my rails app.

ab -n10 -c10 -p ~/post_data_ab.txt -T “multipart/form-data;
boundary=1234567” http://localhost:3000/albums

I have used the above command for testing upload photos. But am getting
the following error.

[2011-10-11 11:38:38] ERROR EOFError: bad content body
/usr/local/lib/ruby/gems/1.9.1/gems/rack-1.3.3/lib/rack/multipart/parser.rb:73:in
block in fast_forward_to_first_boundary' /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.3.3/lib/rack/multipart/parser.rb:70:inloop’
/usr/local/lib/ruby/gems/1.9.1/gems/rack-1.3.3/lib/rack/multipart/parser.rb:70:in
fast_forward_to_first_boundary' /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.3.3/lib/rack/multipart/parser.rb:15:inparse’
/usr/local/lib/ruby/gems/1.9.1/gems/rack-1.3.3/lib/rack/multipart.rb:25:in
parse_multipart' /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.3.3/lib/rack/request.rb:306:inparse_multipart’
/usr/local/lib/ruby/gems/1.9.1/gems/rack-1.3.3/lib/rack/request.rb:182:in
POST' /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.3.3/lib/rack/methodoverride.rb:15:incall’
/usr/local/lib/ruby/gems/1.9.1/gems/rack-1.3.3/lib/rack/runtime.rb:17:in
call' /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.1.0/lib/active_support/cache/strategy/local_cache.rb:72:incall’
/usr/local/lib/ruby/gems/1.9.1/gems/rack-1.3.3/lib/rack/lock.rb:15:in
call' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-3.1.0/lib/action_dispatch/middleware/static.rb:53:incall’
/usr/local/lib/ruby/gems/1.9.1/gems/rack-cache-1.0.3/lib/rack/cache/context.rb:132:in
forward' /usr/local/lib/ruby/gems/1.9.1/gems/rack-cache-1.0.3/lib/rack/cache/context.rb:139:inpass’
/usr/local/lib/ruby/gems/1.9.1/gems/rack-cache-1.0.3/lib/rack/cache/context.rb:151:in
invalidate' /usr/local/lib/ruby/gems/1.9.1/gems/rack-cache-1.0.3/lib/rack/cache/context.rb:70:incall!’
/usr/local/lib/ruby/gems/1.9.1/gems/rack-cache-1.0.3/lib/rack/cache/context.rb:50:in
call' /usr/local/lib/ruby/gems/1.9.1/gems/airbrake-3.0.4/lib/airbrake/user_informer.rb:12:incall’
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.1.0/lib/rails/engine.rb:455:in
call' /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.1.0/lib/rails/rack/content_length.rb:16:incall’
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.1.0/lib/rails/rack/log_tailer.rb:14:in
call' /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.3.3/lib/rack/handler/webrick.rb:59:inservice’
/usr/local/lib/ruby/1.9.1/webrick/httpserver.rb:111:in service' /usr/local/lib/ruby/1.9.1/webrick/httpserver.rb:70:inrun’
/usr/local/lib/ruby/1.9.1/webrick/server.rb:183:in `block in
start_thread’

Don’t know whats the wrong in this.

Waiting for yours help.

Note:(post_data_ab.txt file)

–1234567
Content-Disposition: form-data; name=“ID”

3
–1234567
Content-Disposition: form-data; name=“photo”; filename=“radio-on.jpg”
Content-Type: image/jpeg

encoded file content goes here
–1234567–

Thanks,
Priya

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs