Hello all--

I encountered an issue last night that appears to be related to the new routes implementation. We're running edge rails for our production e-commerce app (* ignores snickers from the crowd *), and had to roll back when last night's deployment failed. What we were seeing in the log is:


------------------------------------------------------------------------ ------------------------------
Processing Base#index (for 10.0.1.252 at 2006-06-05 23:22:56) [GET]
  Session ID: 051255ad8aed403a821bafba0950d079
  Parameters: {}


RegexpError (regular expression too big: / *** large regexp fragment here ***): /vendor/rails/actionpack/lib/action_controller/routing.rb:515:in `initialize' /vendor/rails/actionpack/lib/action_controller/routing.rb:515:in `regexp_chunk' /vendor/rails/actionpack/lib/action_controller/routing.rb:196:in `recognition_extraction' /vendor/rails/actionpack/lib/action_controller/routing.rb:194:in `recognition_extraction' /vendor/rails/actionpack/lib/action_controller/routing.rb:158:in `write_recognition' /vendor/rails/actionpack/lib/action_controller/routing.rb:247:in `recognize' /vendor/rails/actionpack/lib/action_controller/routing.rb:996:in `recognize_path' /vendor/rails/actionpack/lib/action_controller/routing.rb:995:in `recognize_path' /vendor/rails/actionpack/lib/action_controller/routing.rb:988:in `recognize'
*** stack trace continues ***
------------------------------------------------------------------------ ------------------------------


I can't seem to duplicate this anywhere -- running the below code in the console (taken from routing.rb:514-515 and tweaked for irb) runs fine.


------------------------------------------------------------------------ ------------------------------ possible_names = ActionController::Routing.possible_controllers.collect { |name| Regexp.escape name }
regexp = nil
Regexp.new("(?i-:(#{(regexp || Regexp.union (*possible_names)).source}))") ------------------------------------------------------------------------ ------------------------------

A bit of trivia here: our possible_names array contains 125 entries, and the resulting regular expression source is ~ 3500 characters.

As a separate issue: I did notice in perusing the possible_names array that there is now a lot of "stuff" which rails will recognize as an "available" route out of the box (for example: /rails/ actionpack/examples/address_book), so it feels like $LOAD_PATH needs to be filtered a bit, at least for a production environment. Is this expanded route scope by design, or should I file a ticket on it?

Back to the main issue, any ideas on reproducing/troubleshooting the Regexp exception? We've configured a parallel deployment of the app and run it successfully on another port, but I'm not yet warm and fuzzy that the issue won't pop up again.

Thanks in advance,

Solomon
_______________________________________________
Rails-core mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to