2012-03-02 9 views
0

シンプルなレールアプリケーションでThinサーバーを使用するのはかなり新しいです。私がアプリで任意のページに行くと、1〜4のうち倍、多かれ少なかれ、私はブラウザ上でこれを得ること、を除いてうまく働いています:シンプルなRailsアプリケーションでThin Serverを使用するとログに予期しないエラーが発生する

Processing PlansController#index (for 24.61.84.158 at 2012-03-02 17:53:48) [GET] 
    Session ID: 3105294042126eab3c6292d3ba224847 
    Parameters: {"controller"=>"plans", "action"=>"index"} 
Rendering layoutfalseactionlist within layouts/standard 
Rendering plans/list 
Completed in 0.18974 (5 reqs/sec) | Rendering: 0.10813 (56%) | DB: 0.03900 (20%) | 200 OK [http://admin.blogbridge.com/] 
file /tmp/ruby_sess.5684ebd33a502d9d not readable 
/usr/local/rvm/rubies/ruby-1.8.7-p357/lib/ruby/1.8/pstore.rb:100:in `initialize' 
/usr/local/rvm/rubies/ruby-1.8.7-p357/lib/ruby/1.8/cgi/session/pstore.rb:61:in `new' 
/usr/local/rvm/rubies/ruby-1.8.7-p357/lib/ruby/1.8/cgi/session/pstore.rb:61:in `initialize' 
/usr/local/rvm/rubies/ruby-1.8.7-p357/lib/ruby/1.8/cgi/session.rb:280:in `new' 
/usr/local/rvm/rubies/ruby-1.8.7-p357/lib/ruby/1.8/cgi/session.rb:280:in `initialize' 
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/actionpack-1.13.3/lib/action_controller/cgi_process.rb:123:in `new' 
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/actionpack-1.13.3/lib/action_controller/cgi_process.rb:123:in `session' 
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/actionpack-1.13.3/lib/action_controller/cgi_process.rb:155:in `stale_session_check!' 
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/actionpack-1.13.3/lib/action_controller/cgi_process.rb:110:in `session' 
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/actionpack-1.13.3/lib/action_controller/base.rb:1052:in `assign_shortcuts_without_flash' 
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/actionpack-1.13.3/lib/action_controller/flash.rb:140:in `assign_shortcuts' 
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/actionpack-1.13.3/lib/action_controller/base.rb:424:in `process_without_filters' 
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/actionpack-1.13.3/lib/action_controller/filters.rb:624:in `process_without_session_management_support' 
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/actionpack-1.13.3/lib/action_controller/session_management.rb:114:in `process' 
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/actionpack-1.13.3/lib/action_controller/base.rb:330:in `process' 
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/rails-1.2.3/lib/dispatcher.rb:41:in `dispatch' 
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/thin-1.3.1/lib/rack/adapter/rails.rb:89:in `call' 
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/thin-1.3.1/lib/rack/adapter/rails.rb:69:in `call' 
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/thin-1.3.1/lib/thin/connection.rb:80:in `pre_process' 
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/thin-1.3.1/lib/thin/connection.rb:78:in `catch' 
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/thin-1.3.1/lib/thin/connection.rb:78:in `pre_process' 
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/thin-1.3.1/lib/thin/connection.rb:53:in `process' 
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/thin-1.3.1/lib/thin/connection.rb:38:in `receive_data' 
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine' 
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run' 
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/thin-1.3.1/lib/thin/backends/base.rb:61:in `start' 
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/thin-1.3.1/lib/thin/server.rb:159:in `start' 
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/thin-1.3.1/lib/thin/controllers/controller.rb:86:in `start' 
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/thin-1.3.1/lib/thin/runner.rb:185:in `send' 
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/thin-1.3.1/lib/thin/runner.rb:185:in `run_command' 
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/thin-1.3.1/lib/thin/runner.rb:151:in `run!' 
/usr/local/rvm/gems/ruby-1.8.7-p357/gems/thin-1.3.1/bin/thin:6 
/usr/local/rvm/gems/ruby-1.8.7-p357/bin/thin:19:in `load' 
/usr/local/rvm/gems/ruby-1.8.7-p357/bin/thin:19 

Status: 500 Internal Server Error Content-Type: text/html 
Application error 

Change this error message for exceptions thrown outside of an action (like in Dispatcher   setups or broken Ruby code) in public/500.html 

とログで、この誰もこれを前に見たことがありますか?

+0

解決策の回避策が増えましたが、セッション用にmemcacheストアを使用することを検討してください。これにより、スケーラビリティと高速性が向上し、この問題を回避できる可能性が高くなります。 Btw、分散アーキテクチャー、またはこれがオンになっているファイルシステムについて特別なことはありますか? –

+0

ありがとうございます。しかし、いいえ、それはかなりバニラセットアップです。 CentOSを走らせているLinodeのLinuxボックス。 Apache仮想ドメイン経由でThinサーバーを起動することを試してみてください。他の考え? – pitosalas

答えて

1

私には、レール1.2.3がスタックされているということがあります。 bundle exec thinの場合、正しいバージョンのレールを手に入れることができますが、アプリの依存関係ではないすべての宝石を削除することで強制することもできます。

rvmは開発には最適ですが、システムレベルでインストールすると価値が高くなるとは確信していませんし、プロダクションシステム(特にCentOS)で多くの人が苦労していると聞いています環境がどんなthinで実行されていても正しいです。あなたがレールの配備を初めて熟知しているならば、乗客のようなものを使うことを考えてください。ちょうどsudo gem installの依存関係です。

関連する問題