Hi Zed or anyone that is also looking at Mongrel, Just want to report something that, although doesn''t crash mongrel, is rather annoying. I am running the latest Mongrel 0.3.13.3 - ruby version on cygwin (yeah, poor me). When I start mongrel_rails with ActiveRecord::Base.allow_concurrency = true in environment.rb, I see a lot of "Error sending file /cygdrive/c/[snipped]/[default java scripts].js : Software caused connection abort" While these don''t cause any harm, they are concerning... Also, I see the following error more often as well: Lost connection to MySQL server during query [ the exception traces vary but do involve routing; here is an example:] /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/vendor/mysql.rb:1112:in `write'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/vendor/mysql.rb:1162:in `finalizer'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/code_generation.rb:54:in `<<'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:548:in `generation_code_for'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/code_generation.rb:46:in `method_missing'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/code_generation.rb:19:in `indent'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/code_generation.rb:46:in `method_missing'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:545:in `generation_code_for'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:488:in `write_generation'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:482:in `write_generation'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:629:in `draw'' #{RAILS_ROOT}/config/routes.rb:1 /usr/bin/mongrel_rails:18 When I see such page, refreshing once or twice typically works. With ActiveRecord::Base.allow_concurrency set to false (i.e. the default), everything chugs along pretty well. Don''t know whether this problem is particular to cygwin environment or is generic when one turns on ActiveRecord::Base.allow_concurrency (or this is just my system...). Philip
On 8/10/06, Philip Lipu Tsai <tsailipu at gmail.com> wrote:> Hi Zed or anyone that is also looking at Mongrel, > > Just want to report something that, although doesn''t crash mongrel, is > rather annoying. > > I am running the latest Mongrel 0.3.13.3 - ruby version on cygwin > (yeah, poor me). When I start mongrel_rails with > ActiveRecord::Base.allow_concurrency = true in environment.rb, I see a > lot of > "Error sending file /cygdrive/c/[snipped]/[default java scripts].js > : Software caused connection abort" > > While these don''t cause any harm, they are concerning... > Also, I see the following error more often as well: > > Lost connection to MySQL server during query > [ the exception traces vary but do involve routing; here is an example:] > /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/vendor/mysql.rb:1112:in > `write'' > /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/vendor/mysql.rb:1162:in > `finalizer'' > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/code_generation.rb:54:in > `<<'' > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:548:in > `generation_code_for'' > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/code_generation.rb:46:in > `method_missing'' > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/code_generation.rb:19:in > `indent'' > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/code_generation.rb:46:in > `method_missing'' > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:545:in > `generation_code_for'' > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:488:in > `write_generation'' > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:482:in > `write_generation'' > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:629:in > `draw'' > #{RAILS_ROOT}/config/routes.rb:1 > /usr/bin/mongrel_rails:18 > > When I see such page, refreshing once or twice typically works. > > With ActiveRecord::Base.allow_concurrency set to false (i.e. the > default), everything chugs along pretty well. Don''t know whether > this problem is particular to cygwin environment or is generic when > one turns on ActiveRecord::Base.allow_concurrency (or this is just my > system...).mail by Zed from another thread (mongrel and multi apps):> Someone else can speak to Rails and whether it actually is threadsafe or not. > > However, you misunderstand Mongrel''s handler for Rails. Take a look > at the source code. It''s clean and easy to read. The Rails handler > has a single Rails application instance, and it has a mutex that it > uses to limit request processing within Rails to one at a time. The > use of this guard mutex can be disabled in the handler, if you want to > use Rails multithreaded, but Zed has a strongly worded warning against > doing that in the code. >Yes, also known as the Great Katana Suicide Warning. The name should probably tell that you shouldn''t use it.
Nice... I saw some discussion about why-not?''s of turning on this option, so thought of playing with this setting. Probably those "why-not? only applied to WEBrick. I just now found a thread where Zed replied with quite some details on this as well. http://rubyforge.org/pipermail/mongrel-users/2006-May/000302.html Thanks! On 8/10/06, Jan Svitok <jan.svitok at gmail.com> wrote:> On 8/10/06, Philip Lipu Tsai <tsailipu at gmail.com> wrote: > > Hi Zed or anyone that is also looking at Mongrel, > > > > Just want to report something that, although doesn''t crash mongrel, is > > rather annoying. > > > > I am running the latest Mongrel 0.3.13.3 - ruby version on cygwin > > (yeah, poor me). When I start mongrel_rails with > > ActiveRecord::Base.allow_concurrency = true in environment.rb, I see a > > lot of > > "Error sending file /cygdrive/c/[snipped]/[default java scripts].js > > : Software caused connection abort" > > > > While these don''t cause any harm, they are concerning... > > Also, I see the following error more often as well: > > > > Lost connection to MySQL server during query > > [ the exception traces vary but do involve routing; here is an example:] > > /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/vendor/mysql.rb:1112:in > > `write'' > > /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.3/lib/active_record/vendor/mysql.rb:1162:in > > `finalizer'' > > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/code_generation.rb:54:in > > `<<'' > > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:548:in > > `generation_code_for'' > > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/code_generation.rb:46:in > > `method_missing'' > > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/code_generation.rb:19:in > > `indent'' > > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/code_generation.rb:46:in > > `method_missing'' > > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:545:in > > `generation_code_for'' > > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:488:in > > `write_generation'' > > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:482:in > > `write_generation'' > > /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/routing.rb:629:in > > `draw'' > > #{RAILS_ROOT}/config/routes.rb:1 > > /usr/bin/mongrel_rails:18 > > > > When I see such page, refreshing once or twice typically works. > > > > With ActiveRecord::Base.allow_concurrency set to false (i.e. the > > default), everything chugs along pretty well. Don''t know whether > > this problem is particular to cygwin environment or is generic when > > one turns on ActiveRecord::Base.allow_concurrency (or this is just my > > system...). > > mail by Zed from another thread (mongrel and multi apps): > > > Someone else can speak to Rails and whether it actually is threadsafe or not. > > > > However, you misunderstand Mongrel''s handler for Rails. Take a look > > at the source code. It''s clean and easy to read. The Rails handler > > has a single Rails application instance, and it has a mutex that it > > uses to limit request processing within Rails to one at a time. The > > use of this guard mutex can be disabled in the handler, if you want to > > use Rails multithreaded, but Zed has a strongly worded warning against > > doing that in the code. > > > > Yes, also known as the Great Katana Suicide Warning. > > The name should probably tell that you shouldn''t use it. > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >