我有一個簡單的博客應用程序,放在Heroku的免費5GB空間上。當我發送請求併發送請求時,響應時間很快,我得到一個響應。Heroku - 極慢放置請求更新
同樣的事情發生在我的放置請求(在我的應用程序中指定的標準302重定向,完美地在我的本地服務器上工作)。然而,我的頁面不會隨着新的信息更新,直到分鐘,有時在實際頁面上稍後幾分鐘(約10-20分鐘)。
更新我看了看我的英雄導軌控制檯,似乎信息更新了。我相信它可能是瀏覽器/緩存問題,但我不確定爲什麼?
我不太清楚爲什麼會發生這種情況。這是我的文章控制器中的更新代碼。
def update
@article = Article.find(params[:id])
respond_to do |format|
if @article.update_attributes(params[:article])
format.html { redirect_to(@article, :notice => 'Article was successfully updated.') }
format.xml { head :ok }
else
format.html { render :action => "edit" }
format.xml { render :xml => @article.errors, :status => :unprocessable_entity }
end
end
end
按照要求,這裏是我的尾巴日誌的PUT請求部分。
2013-06-19T01:13:01.124408+00:00 app[web.1]: Started PUT "/articles/5-Literary-
Compositions-" for 99.232.11.181 at 2013-06-19 01:13:01 +0000
2013-06-19T01:13:01.445438+00:00 heroku[router]: at=info method=POST path=/articles/5-
Literary-Compositions- host=hidden-taiga-5779.herokuapp.com fwd="99.232.11.181" dyno=web.1
connect=2ms service=516ms status=302 bytes=138
2013-06-19T01:13:01.443470+00:00 app[web.1]: Processing by ArticlesController#update as HTML
2013-06-19T01:13:01.443470+00:00 app[web.1]: #post information was in here, large post
2013-06-19T01:13:01.443470+00:00 app[web.1]:
Redirected to http://hidden-taiga-5779.herokuapp.com/articles/5-Literary-Compositions-
2013-06-19T01:13:01.443470+00:00 app[web.1]: Completed 302 Found in 279ms (ActiveRecord: 71.2ms)
你能顯示Heroku日誌嗎?運行'heroku日誌'這會告訴你可能會發生什麼。從外觀上看,我不明白爲什麼你的'update'方法有問題。 – David
更新了原文帖子 – ebbflowgo
也許這是瀏覽器或緩存問題?在我的heroku導軌控制檯中,信息是正確的。 – ebbflowgo