2013-12-12 32 views
0

使用載波通過CarrierWave上傳PDF文檔。然後使用RMagick將pdf的第一頁保存爲thumbnail.jpg。我在我的開發環境(Mac OS X 10.9)中正常工作,但是它的生產失敗(Ubuntu 12.04 LTS上的Nginx + Unicorn)。Rails + CarrierWave + RMagick不記錄錯誤..?

根據瀏覽器狀態欄中的上傳百分比,看起來上傳成功完成。但是,在處理中出現錯誤,並且我得到了Rails錯誤頁面。問題是,我的production.log中沒有任何內容。

我得到unicorn.log如下:

I, [2013-12-12T01:22:55.232431 #2935] INFO -- : worker=1 ready 
I, [2013-12-12T01:22:55.246992 #2932] INFO -- : worker=0 ready 
E, [2013-12-12T01:26:00.666715 #2929] ERROR -- : worker=1 PID:2935 timeout (31s > 30s),  killing 
E, [2013-12-12T01:26:00.676250 #2929] ERROR -- : reaped #<Process::Status: pid 2935 SIGKILL (signal 9)> worker=1 
I, [2013-12-12T01:26:00.676382 #2929] INFO -- : worker=1 spawning... 
I, [2013-12-12T01:26:00.681087 #3502] INFO -- : worker=1 spawned pid=3502 
I, [2013-12-12T01:26:00.681399 #3502] INFO -- : Refreshing Gem list 
    SECURITY WARNING: No secret option provided to Rack::Session::Cookie. 
    This poses a security threat. It is strongly recommended that you 
    provide a secret to prevent exploits that may be possible from crafted 
    cookies. This will not be supported in future versions of Rack, and 
    future versions will even invalidate your existing user cookies. 

    Called from: /home/deployer/apps/______/shared/bundle/ruby/1.9.1/gems/actionpack-3.2.9/lib/action_dispatch/middleware/session/abstract_store.rb:28:in `initialize'. 

這在我的nginx的error.log中

2013/12/12 01:26:00 [error] 2597#0: *9 upstream prematurely closed connection while reading response header from upstream, client: ###.###.###.###, server: ___.org, request: "POST /admin/explores HTTP/1.1", upstream: "http://unix:/tmp/unicorn.sock:/admin/explores", host: "___.org", referrer: "https://___.org/admin/explores/new" 

不知道怎麼弄怎麼回事更好的錯誤描述。將不勝感激任何幫助。

謝謝!

的Ruby 1.9.3 + Rails的3.2.9

回答

相關問題