Welcome Guest | Login

'We're sorry but something went wrong' ...

Hi,

I 've been struggling for quite a while getting capified deployment to my hostingrails account to work properly.

I actually managed recently, but now I've tried again with a new app (I changed the symlink) and have once again run into a 'we're sorry but something went wrong error'.

I checked the production log and it contains data - but it does not seem to update any longer. What is in the log right now is about 30 minutes old - and a lot of changes have been committed since then + the error in the log is not the one that I experience.

When i tail -f the production.log file, I get some cryptic fastcgi-errors displayed - but they all point to lib-files elsewhere on the server it seems?

- - - - - - - - - -

applabd@zwingli [~/apps/FrBo2008/current]$ tail -f log/production.log
   /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:77:in `process_each_request'
   /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:612:in `each_cgi'
   /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each'
   /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each_cgi'
   /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:76:in `process_each_request'
   /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:50:in `process!'
   /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/fcgi_handler.rb:24:in `process!'
   dispatch.fcgi:24

Rendering /home/applabd/apps/FrBo2008/releases/20080711224812/public/500.html (500 Internal Server Error)

- - - - - - - - - -

I've checked the database.yml file = OK, the .htaccess-file = OK and the environment.rb-file = OK. The fastcgi handler file seems to be okay as well.

Could anyone point me to what is going wrong? I'd really like to understand the actual cause of this kind of error - to be wiser next time a similar error gets in my way ...

Thanks and BR,
Bo

2008-07-11 06:18 PM

Hi Bobo,

Your application is loading fine now, please verify it from your end. I have killed the previously running dispatch.fcgi process and accessed your application again to make the changes effective. Please make sure to kill the fcgi process after making changes to reflect via browser.

pkill -9 dispatch.fcgi -u username

Note:- Please avoid from posting account specific details in forum.

2008-07-11 07:17 PM

Hi folks,

after a couple of tries, "Application error - Rails application failed to start properly" and retries I managed to get a 'We're sorry but something went wrong'. Since then the production.log had entries. First an error like "CGI::Session::CookieStore::TamperedWithCookie" with  the 500 Internal Server Error occured.

When I dropped the cookies, killed the dispatch.fcgi and refreshed the browser I got the "Application error - Rails application failed to start properly" error again.

Surprisingly the production.log tells me everything is working out fine (200 OK).

I guessed it's about the .htaccess file so i tried to uncomment fcgi and commented out the cgi handler (contradictory to the tutorial  - why use the cgi instead of the fcgi anyway???):

AddHandler fastcgi-script .fcgi
#AddHandler cgi-script .cgi

The error changed into this:
-------------------------------------------------
#!/usr/local/bin/ruby
#
# You may specify the path to the FastCGI crash log (a log of unhandled
# exceptions which forced the FastCGI instance to exit, great for debugging)
# and the number of requests to process before running garbage collection.
#
# By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log
# and the GC period is nil (turned off).  A reasonable number of requests
# could range from 10-100 depending on the memory footprint of your app.
#
# Example:
#   # Default log path, normal GC behavior.
#   RailsFCGIHandler.process!
#
#   # Default log path, 50 requests between GC.
#   RailsFCGIHandler.process! nil, 50
#
#   # Custom log path, normal GC behavior.
#   RailsFCGIHandler.process! '/var/log/myapp_fcgi_crash.log'
#
require File.dirname(__FILE__) + "/../config/environment"
require 'fcgi_handler'

RailsFCGIHandler.process!
-------------------------------------------------



my chrashlog seems ok:
-------------------------------------------------
...starting
...asked to stop immediately (I killed it manually)
...stopping after explicit exit
...starting
-------------------------------------------------




Do you have a hint? whats the mistake I make? Is it really about the .htaccess file?



Cheers!

2008-07-15 02:13 PM

Btw:

when i run dispatch.fcgi I also get my index page displayed



I seem to be close....

2008-07-15 02:18 PM

One day later it worked all of the sudden. But only until I redeployed the application (copied the whole app subdirectory to the server).

Again I get the "Application error - Rails application failed to start properly" error.

Still I can run dispatch.fcgi without error. What is it?



PLEASE, WHAT CAN I DO?

2008-07-31 04:24 AM

Hi One,

Please update us with output obtained after executing the following command from your rails application folder.

$ public/dispatch.fcgi

Ps: Avoid from posting account related information.

2008-07-31 06:30 AM

Hi Vinayan,

this time you have been quick. Marvellous. I deployed it once more and now it works. I don't know what was the reason and I guess next time it's not working again.


Functioning in the browser or not, the dispatch.fcgi command always returns the correct content of my index page.



ONE

2008-08-05 02:10 PM


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