Hi, I''m attempting to create a second production environment, because I have multiple databases to maintain, and production is much faster. So now I have 2 ''production style'' environments, called ''production'' and ''apiloc_production'' To create the apiloc_production environment, I added a new entry in database.yml: apiloc_production: adapter: postgresql database: apiloc timeout: 5000 I also created an apiloc_production.rb file in config/environments by simply copying production.rb (attached). There is no difference between these files. I expected that ''production'' and ''apiloc_production'' environments would behave in the same way, with the exception that different databases would be accessed. However, this is not the case. apiloc_production is much slower (~10x) than production, and apiloc_production logs SQL queries to its log file, whereas production doesn''t. So I''m confused - how can I make apiloc_production act more like production? Is ''production'' environment treated differently under the hood of rails somehow? Thanks, ben running rails 2.3.5, ruby 1.8.7 Attachments: http://www.ruby-forum.com/attachment/4728/apiloc_production.rb -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
First simple question: Have you compared the log files for those two environments? Is your second "production" environment really being treated as production? Sounds like you''re getting all the dev class reloading and logging, just like a non-production environment. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Ar Chron wrote:> First simple question: > > Have you compared the log files for those two environments? Is your > second "production" environment really being treated as production? > > Sounds like you''re getting all the dev class reloading and logging, just > like a non-production environment.Thanks for the help. The apiloc_production log file is different than the production log file, because the apiloc_production is filled with SQL queries, whereas the production log file is empty except for the time of it''s creation. I wonder idly, could this be caused somehow by plugins that treat the environments differently? I''ll have a go trying to figure that out and get back to the list. Any other ideas on how to fix this? Thanks, ben -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.