Welcome Guest | Login

Application Errors with strange 302 Found Messages

I can't seem to get this to repeat regularly but what seems like every 1 out 4 of my sign ups (i.e. create person) cause an application error:

"Application error Rails application failed to start properly"

This has never happened to me in development. Here's what the log looks like:

Processing PeopleController#create (for 66.65.187.5 at 2008-06-19
09:47:23) [POST]
 Session ID: B...[snip]...d246e
 Parameters: {"commit"=>"Sign up",
"authenticity_token"=>"995b1cdc19ec4255dbf0135a68b905c963f1d9ab",
"action"=>"create", "controller"=>"people",
"person"=>{"name"=>"user_name", "password_confirmation"=>"1234",
"password"=>"1234", "email"=>"users_email@gmail.com"}}
Cookie set: auth_token=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT
Sent mail:
From: Email verification <email@domain.com>
To: users_email@gmail.com
Subject: Email verification
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8

Click here to complete your email verification:
http://domain.com/people/verify/8d704410-203c-012b-4204-f4ae03f...

Thanks!
Redirected to http://www.domain.com/thanks.html
Completed in 0.63258 (1 reqs/sec) | DB: 0.00000 (0%) | 302 Found
http://www.domain.com/people]

The strange thing is that my code doesn't redirect to people/index.
Here's the create method:

def create
   cookies.delete :auth_token
   @person = Person.new(params[:person])
   respond_to do |format|
     @person.deactivated = true if global_prefs.email_verifications?
     if @person.save
       if global_prefs.email_verifications?
         @person.email_verifications.create
         flash[:notice] = %(Thanks for signing up! A verification email has been sent to #...@person.email}.)
         # format.html { redirect_to(home_url) } # extracted for pre-launch
         format.html { redirect_to('/thanks.html') } # added for pre-launch
       else
         self.current_person = @person
         flash[:notice] = "Thanks for signing up!"
         format.html { redirect_back_or_default(home_url) }
       end
     else
       @body = "register single-col"
       format.html { render :action => 'new' }
     end
   end
 end

Any idea of why it would fail and redirect to people?
I feel like it might be a session or cookie thing or some server detail I am not aware of, but I am not experienced enough to know how to track this down. Any advice would be greatly appreciated.

2008-06-21 12:20 AM

Looks like you're missing a left bracket on this line:

flash[:notice] = %(Thanks for signing up! A verification email has been sent to #...@person.email}.)
       

but i don't think that's the problem - is this a fastcgi, mongrel, or mod_rails app ?  I would suggest getting to mongrel if you aren't already.  

Does the problem happen on all browsers?

2008-06-21 04:05 PM

Hey William that bracket is there. It got deleted in a cutting and pasting action.

I believe it is a fastcgi shared server. Though one of the techs who was deploying my app [#20080611111937656] mentioned starting the mongrel service, but he may have simply been misinformed.

Do you think this might be a corrupt mongrel server that is intermittently getting this action?

Is there a good reason why this wouldn't happen with some other action?

And yes, I am experiencing this problem on both FF and IE.

Will there be any downtime associated with moving to my own mongrel server?

2008-06-21 04:18 PM

Hi Fountain,

We have started your application on mongrel. Please verify it from your end. We will update you with the details of mongrel instance through the ticket [#20080611111937656].

2008-06-21 05:56 PM


Hello Guest! In order to post you must be an active client with us, please log in or sign up.