【问题标题】:Getting an 'Application Error' when trying to push my database to Amazon RDS with the heroku gem尝试使用 heroku gem 将我的数据库推送到 Amazon RDS 时出现“应用程序错误”
【发布时间】:2016-04-20 19:33:30
【问题描述】:

每当我尝试将本地 mysql 数据库推送到 Amazon RDS 时,都会收到 503 应用程序错误:

bundle exec heroku db:push
...
Sending schema
Schema:         40% |================                          | ETA:  00:00:38
Saving session to push_201106170529.dat..
!!! Caught Server Exception
HTTP CODE: 503
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
 <head>
    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
    <style type="text/css">
     html, body, iframe { margin: 0; padding: 0; height: 100%; }
     iframe { display: block; width: 100%; border: none; }
    </style>
    <title>Application Error</title></head>
 </head>
 <body>
  <iframe src="https://s3.amazonaws.com/heroku_pages/error.html">
    <p>Application Error</p>
  </iframe>
 </body>
</html>

我正在使用水龙头 0.3.23

虽然错误消息与此处报告的类似:Heroku help Amazon RDS rails push database error 我的问题与亚马逊的安全组无关,因为它已经配置。

还有其他人遇到这个问题吗?

【问题讨论】:

  • 似乎已修复。再次推动工作。与此同时,如果有人遇到同样的问题,我是手动完成的:mysqldump -u root &lt;development_database&gt; | mysql -u &lt;username&gt; -p&lt;secretpassword&gt; --host &lt;rds_url&gt; -C &lt;rds_databasename&gt;

标签: ruby-on-rails ruby heroku amazon-rds taps


【解决方案1】:

使用带有 CURL POST 请求的 Heroku,我得到了相同的 HTML 响应消息和 HTTP 错误代码。

执行heroku logs | tail给了我更多的见解:

2016-04-20T10:56:17.509354+00:00 heroku[router]: 
at=error code=H12 desc="Request timeout" method=POST [...]

H12 错误表示请求超时。这意味着“HTTP 请求的完成时间超过 30 秒”[1]。

更多关于https://devcenter.heroku.com/articles/request-timeout的请求超时。

[1]https://devcenter.heroku.com/articles/error-codes#h12-request-timeout

【讨论】:

    【解决方案2】:

    我第一次尝试使用 heroku db:push 时得到了相同的响应。

    但是,当我第二次运行它时,没有错误,并且数据库被推送。

    【讨论】:

    • 这不是我第一次运行这个命令,但它突然停止工作,我尝试了几次,从几台电脑上都没有成功。仅仅一周后,事情似乎又恢复了正常。
    • 我同意。这似乎是一个间歇性问题。昨晚它工作可靠,今天它每次都失败,但在过程的不同部分。
    猜你喜欢
    • 1970-01-01
    • 2011-03-10
    • 2011-07-18
    • 1970-01-01
    • 1970-01-01
    • 2012-04-18
    • 1970-01-01
    • 2016-09-17
    • 2021-11-22
    相关资源
    最近更新 更多