[英]Constant 500 Errors on Heroku
I recently switched from Heroku's Bamboo stack to the Cedar one (Rails 3.1.4, Ruby 1.9.2, Thin gem for web server). 我最近从Heroku的Bamboo堆栈切换到了Cedar堆栈(Rails 3.1.4,Ruby 1.9.2,用于Web服务器的Thin gem)。 Since then I keep getting 500 errors such as this, where it seems that the query is not acting right:
从那时起,我不断收到500个这样的错误,似乎查询的行为不正确:
207 <13>1 2012-05-06T16:10:51+00:00 d. app web.1 - - ActiveRecord::StatementInvalid (Mysql::Error: : SELECT `foos`.* FROM `foos` WHERE `foos`.`id` = ? LIMIT 1)
It's not an error in the code though because the page eventually renders successfully (ie status 200) when I refresh the page. 但这不是代码中的错误,因为刷新页面时页面最终成功渲染(即状态200)。 Sometimes it is 1 refresh, but can get up to 4 refreshes before I get a 200.
有时是1次刷新,但在获得200次刷新之前最多可以刷新4次。
I thought it was the database because I was on ClearDB's free plan, but I upgraded to ClearDB's next plan with better I/O performance and it still happens 我以为这是数据库,因为我处于ClearDB的免费计划中,但是我升级到ClearDB的下一个计划,具有更好的I / O性能,但它仍然会发生
Do you get the same errors if you are in console heroku run console
? 如果您在控制台
heroku run console
中,会得到同样的错误吗? I've never seen this before. 我以前从未见过。 Try upgrading your Mysql gem, which one are you using http://api.rubyonrails.org/classes/ActiveRecord/StatementInvalid.html i think the correct one is mysql2 https://rubygems.org/gems/mysql2
尝试升级您的Mysql gem,您正在使用http://api.rubyonrails.org/classes/ActiveRecord/StatementInvalid.html升级哪一个?我认为正确的是mysql2 https://rubygems.org/gems/mysql2
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.