Heroku db:push在操作过程中抛出异常

时间:2012-04-30 11:00:41

标签: heroku

我试图在我的Heroku应用程序上执行以下命令:

heroku db:push postgres://username:password@localhost:5432/db_name

在过去的三个月里,我成功地使用了同样的命令,但今天它停止了工作。似乎它一旦达到5MB大小就停止工作(现在它大约8MB大)。问题是我现在开始为共享数据库付费,所以应该允许我有20GB空间。

这是命令输出:

> heroku db:push postgres://username:password@localhost:5432/db_name --account java
Loaded Taps v0.3.23
Warning: Data in the app 'my-test-app' will be overwritten and will not be recoverable.

 !    WARNING: Potentially Destructive Action
 !    This command will affect the app: my-test-app
 !    To proceed, type "my-test-app" or re-run this command with --confirm my-test-app

> my-test-app
Sending schema
Schema:        100% |==========================================| Time: 00:00:46
Sending indexes
test_gift_rec: 100% |==========================================| Time: 00:00:01
test_person:   100% |==========================================| Time: 00:00:01
Sending data
14 tables, 114 records
test_bonus_aw: 100% |==========================================| Time: 00:00:00
test_money_tr: 100% |==========================================| Time: 00:00:00
test_friendsh: 100% |==========================================| Time: 00:00:00
test_friendsh: 100% |==========================================| Time: 00:00:00
test_gift_rec: 100% |==========================================| Time: 00:00:00
test_group:    100% |==========================================| Time: 00:00:00
test_country:  100% |==========================================| Time: 00:00:00
test_user_is_: 100% |==========================================| Time: 00:00:00
test_gift:     100% |==========================================| Time: 00:00:00
test_user_has:   0% |                                          | ETA:  --:--:--
Saving session to push_201204301144.dat..
!!! Caught Server Exception
HTTP CODE: 500
Taps Server Error: undefined method `symbolize_keys' for nil:NilClass
["/app/lib/taps/data_stream.rb:183:in `parse_json'", "/app/lib/taps/server.rb:89:in `block in <class:Server>'","/app/.bundle/gems/ruby/1.9.1/gems/satra-1.0/lib/sinatra/base.rb:865:in `call'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra1.0/lib/sinatra/base.rb:865:in `block in route'", "/app/.bune/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:521:in `instance_eval'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:5:in `route_eval'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:500:in `block (2 levels) in route!'", "/app/.bundle/gems/ruby/9.1/gems/sinatra-1.0/lib/sinatra/base.rb:497:in `catch'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:497:in `block in route!, "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:476:in `each'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/baseb:476:in `route!'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:601:in `dispatch!'", "/app/.bundle/gems/ruby/1.9.1/gems/sinat-1.0/lib/sinatra/base.rb:411:in `block in call!'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `instance_eval'", "/appbundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `block in invoke'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/ba.rb:566:in `catch'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `invoke'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra.0/lib/sinatra/base.rb:411:in `call!'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:399:in `call'", "/app/.bundle/gems/ruby/1.1/gems/sinatra-1.0/lib/sinatra/base.rb:979:in `block in call'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:1005:in `synchroze'", "/app/.bundle/gems/ruby/1.9.1/gems/sinatra-1.0/lib/sinatra/base.rb:979:in `call'", "/home/heroku_rack/lib/static_assets.rb:9:in `call'", "/homheroku_rack/lib/last_access.rb:15:in `call'", "/app/.bundle/gems/ruby/1.9.1/gems/rack-1.2.1/lib/rack/urlmap.rb:47:in `block in call'", "/app/.bundleems/ruby/1.9.1/gems/rack-1.2.1/lib/rack/urlmap.rb:41:in `each'", "/app/.bundle/gems/ruby/1.9.1/gems/rack-1.2.1/lib/rack/urlmap.rb:41:in `call'", "/he/heroku_rack/lib/date_header.rb:14:in `call'", "/app/.bundle/gems/ruby/1.9.1/gems/rack-1.2.1/lib/rack/builder.rb:77:in `call'", "/app/.bundle/gems/by/1.9.1/gems/thin-1.2.7/lib/thin/connection.rb:76:in `block in pre_process'", "/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/lib/thin/connection.rb::in `catch'", "/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/lib/thin/connection.rb:74:in `pre_process'", "/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2/lib/thin/connection.rb:57:in `process'", "/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/lib/thin/connection.rb:42:in `receive_data'","/app/.bundle/ms/ruby/1.9.1/gems/eventmachine0.12.10/lib/eventmachine.rb:256:in`run_machine'","/app/.bundle/gems/ruby/1.9.1/gems/eventmachine0.12.10/lib/eventchine.rb:256:in `run'", "/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/lib/thin/backends/base.rb:57:in `start'", "/app/.bundle/gems/ruby/1.9.1/gems/tn-1.2.7/lib/thin/server.rb:156:in `start'", "/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/lib/thin/controllers/controller.rb:80:in `start'", "/app/.ndle/gems/ruby/1.9.1/gems/thin-1.2.7/lib/thin/runner.rb:177:in `run_command'", "/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/lib/thin/runner.rb:143: `run!'", "/app/.bundle/gems/ruby/1.9.1/gems/thin-1.2.7/bin/thin:6:in `<top (required)>'", "/app/.bundle/gems/ruby/1.9.1/bin/thin:19:in `load'", "/a/.bundle/gems/ruby/1.9.1/bin/thin:19:in `<main>'"]

在Windows 7上运行。

请帮忙!

1 个答案:

答案 0 :(得分:0)

如果你没有在本地和制作之间更改数据库,你可以尝试使用pgbackups插件。

它更可靠,通常比db更快:push / db:pull。

https://devcenter.heroku.com/articles/pgbackups