I know this topic has been discussed before, but I tried every solutions
still cannot solve it.
The thing is, I run my rails app in dreamhost, with FastCGI.
ruby-fcgi-0.8.6 + fcgi-2.4.0)
I can start my app, but I keep hitting 500 error randomly. That is, for
same page, I will get 500 sometimes, but ok after reload.
This is what I got from fastcgi.crash.log
[…] asked to terminate immediately
[…] terminated by explicit exit exit
And in apache log
… FastCGI: incomplete headers (0 bytes) received from server
I search all the forum on the web, and these are what I have done.
- change public/.htaccess to RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
- chmod 755 for dispatch.fcgi, and log directory
- check the ruby path (#!/path/local/bin/ruby) in dispatch.fcgi
- make sure dispatch.fcgi is not dos format (run dos2unix)
But it still doesn’t work after I have done all of these.
Then I tried these
copy the lastest
but actually it’s unnecessary because that file is exactly the same
have in rails 0.14-3
- still doesn’t work
according to this, fcgi has some problem from gem, so I uninstall
gem, and make ruby-fcgi-0.8.6
- the 500 error times reduce, but will still hit it.
downgrade rails to 0.13.1, no help
try to run dispatch.fcgi manually
I got : Status: 500 Internal Server Error
Is that normal ? Can you run dispatch.fcgi manually?
That really drives me crazy.
I don’t know what else I can try, please give me advise if you think of