rails 2 and slow external services

ghazel at gmail.com ghazel at gmail.com
Tue Dec 14 23:30:29 EST 2010


On Tue, Dec 14, 2010 at 6:40 PM, Eric Wong <normalperson at yhbt.net> wrote:
> ghazel at gmail.com wrote:
>>  - I was not using config.threadsafe! (should probably mention that
>> with the Rainbows! + Rails docs somewhere)
>
> Done and pushed out.  Thanks for following up with your resolution
> so others can benefit from your discoveries.
>
> >From 7e2bb251228a30c0d4e66029b20bbbf85bc99a09 Mon Sep 17 00:00:00 2001
> From: Eric Wong <normalperson at yhbt.net>
> Date: Tue, 14 Dec 2010 18:36:34 -0800
> Subject: [PATCH] FAQ: add a note about config.threadsafe!
>
> At least one user ran into it:
> http://mid.gmane.org/AANLkTikegPX2-6Q93++bz_aLt+9nLPJXjg+NkL8tDjeE@mail.gmail.com
> ---
>  FAQ |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/FAQ b/FAQ
> index 7609d55..f45568b 100644
> --- a/FAQ
> +++ b/FAQ
> @@ -98,3 +98,9 @@ For older versions of Rails, the following config.ru will work:
>
>  One thing to watch out for is that RAILS_ENV will not be set in the
>  environment for you, thus we set it to match RACK_ENV.
> +
> +=== I'm using threads and Rails is misbehaving!
> +
> +If you use any of the threaded concurrency models, you will need to use
> +{config.threadsafe!}[http://m.onkey.org/thread-safety-for-your-rails]
> +in your config/environments/$RAILS_ENV.rb

Sadly, also:
https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/3457-actioncontrollercachingsweeper-controller-instance-is-not-thread-safe

-Greg


More information about the rainbows-talk mailing list