dev@glassfish.java.net

Re: Grizzly Failing on multipart...

From: Vivek Pandey <Vivek.Pandey_at_Sun.COM>
Date: Wed, 23 Sep 2009 15:09:49 -0700

Kevin,

There could be several reason Rails is thrown FAILSAFE error. I dont
think it has anything to do with Grizzly.

Looks like this error is thrown from somewhere in Rails dispatch. Not
sure if it has something to do with permissions or seesion. See
http://groups.google.com/group/phusion-passenger/browse_thread/thread/728f842c02719a8b
and also
http://mattwindsurfs.wordpress.com/2007/12/15/failsafe-in-my-rails-production-log/.

Did you try running on mongrel to narrow down if this failure is
specific to glassfish gem?

-vivek.

On 9/23/09 1:04 PM, 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.
>
> Thanks,
>
> - Kevin Marvin
>
> --
> XML is like violence, if it doesn’t solve your problem you’re not
> using enough of it. —Anonymous
>