dev@glassfish.java.net

Re: Grizzly Failing on multipart...

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Wed, 23 Sep 2009 16:39:12 -0400

Salut,

Not sure it's related to Grizzly ;-)

Kevin Marvin wrote:
> Friends:
>
> Our application, running GF Gem 0.9.5 and JRuby 1.3.1 is having a lot
> of trouble with the following:
>
> Processing ManageController#file_upload (for at 2009-09-22 11:16:01)
> [GET]
> Parameters: {"id"=>"22895"}
> Session : user : 19
> Key: Admin: true
> Rendering manage/file_upload
> Completed in 82ms (View: 1, DB: 67) | 200 OK
> [http://okv.cms.brandednews.com/manage/file_upload/22895
> ]
>
> Sep 22, 2009 11:16:01 AM com.sun.grizzly.config.GrizzlyServiceListener
> INFO: /!\ FAILSAFE /!\ Tue Sep 22 11:16:01 -0400 2009
> Status: 500 Internal Server Error
> bad content body
> /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/request.rb:689:in `read_multipart'
> /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/request.rb:658:in `loop'
> /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/request.rb:658:in `read_multipart'
> /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/request.rb:581:in `parse_multipart_form_parameters'
> /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/request.rb:511:in `parse_formatted_request_parameters'
> /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/request.rb:441:in `request_parameters'
> /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/request.rb:392:in `parameters'
> /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/request.rb:30:in `request_method'
> /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
> active_support/memoizable.rb:86:in `request_method'
> /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/request.rb:40:in `method'
> /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/routing/route_set.rb:433:in
> `extract_request_environment'
> /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/routing/route_set.rb:386:in `recognize'
> /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/dispatcher.rb:182:in `handle_request'
> /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/dispatcher.rb:110:in `dispatch_unlocked'
> /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/dispatcher.rb:120:in `dispatch'
> /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/dispatcher.rb:132:in `dispatch_cgi'
> /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/dispatcher.rb:39:in `dispatch'
> file:/opt/sites/bncms/tmp/.glassfish/static-cache/gf/
> glassfish.jar!/rack/adapter/rails.rb:82:in `serve_rails'
> file:/opt/sites/bncms/tmp/.glassfish/static-cache/gf/
> glassfish.jar!/rack/adapter/rails.rb:109:in `call'
> file:/opt/sites/bncms/tmp/.glassfish/static-cache/gf/
> glassfish.jar!/jruby/rack/rails.rb:69:in `call'
> file:/opt/sites/bncms/tmp/.glassfish/static-cache/gf/
> glassfish.jar!/rack/handler/grizzly.rb:55:in `call'
> :1
>
>
> and...
>
> Processing ManageController#video_cat_add (for at 2009-09-22
> 11:16:11) [POST]
> Parameters:
> {"authenticity_token"=>"93cb0df383a2dbec00080b07881cce0e42673e7f",
> "cat_id"=>"3429", "id"=>"24041"}
> Session : user : 33
> Key: Admin: true
> Completed in 191ms (View: 7, DB: 141) | 200 OK
> [http://okv.cms.brandednews.com/manage/video_cat_add/24041?cat_id=3429
> ]
>
> Sep 22, 2009 11:16:12 AM com.sun.grizzly.config.GrizzlyServiceListener
> INFO: /!\ FAILSAFE /!\ Tue Sep 22 11:16:12 -0400 2009
> Status: 500 Internal Server Error
>
> authenticity_token=9db41eafd0a8611ab73c99cebc2280a01590a284&model_names
> %5B%5D=All&tag_names=901+&commit=Search...POST, accepted HTTP methods
> are get, head,
> put, post, delete, and options
> /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/request.rb:32:in `request_method'
> /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
> active_support/memoizable.rb:86:in `request_method'
> /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/request.rb:40:in `method'
> /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/routing/route_set.rb:433:in
> `extract_request_environment'
> /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/routing/route_set.rb:386:in `recognize'
> /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/dispatcher.rb:182:in `handle_request'
> /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/dispatcher.rb:110:in `dispatch_unlocked'
> /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/dispatcher.rb:120:in `dispatch'
> /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/dispatcher.rb:132:in `dispatch_cgi'
> /opt/jruby-1.3.1/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
> action_controller/dispatcher.rb:39:in `dispatch'
> file:/opt/sites/bncms/tmp/.glassfish/static-cache/gf/
> glassfish.jar!/rack/adapter/rails.rb:82:in `serve_rails'
> file:/opt/sites/bncms/tmp/.glassfish/static-cache/gf/
> glassfish.jar!/rack/adapter/rails.rb:109:in `call'
> file:/opt/sites/bncms/tmp/.glassfish/static-cache/gf/
> glassfish.jar!/jruby/rack/rails.rb:69:in `call'
> file:/opt/sites/bncms/tmp/.glassfish/static-cache/gf/
> glassfish.jar!/rack/handler/grizzly.rb:55:in `call'
> :1
>
> Sep 22, 2009 11:16:14 AM com.sun.grizzly.config.GrizzlyServiceListener
> INFO:
>
>
> When this happens, the app starts to fail miserably. If we restart
> the gem, it will run fine for a while, then start to fail. This is
> running in thread-safe mode, on an 8-way server with 4gb of ram. I
> really need your help to get this stable before the application is put
> into production.

Can you file an issue here:

   * https://glassfish.dev.java.net/servlets/ProjectIssues

File it under category JRuby as this is handled by a GrizzlyAdapter for
JRuby. If you can attach a test case that would be quite nice.

Thanks

-- Jeanfrancois



>
> Thanks,
>
> - Kevin Marvin
>
> --
> XML is like violence, if it doesn’t solve your problem you’re not using
> enough of it. —Anonymous
>