标签: heroku-postgres

Heroku代码= H10 desc ="App崩溃" - 无法弄清楚它崩溃的原因

我一直在寻找这个问题一段时间,但在我的情况下找不到任何似乎适用的东西.我一直盯着这些日志,我看不出是什么问题.

这在以前的部署过程中发生过,但似乎总是自行解决.现在这只是自己发生的(没有部署),我无法摆脱它.尝试恢复到以前版本的应用程序,但似乎我被卡住了.我重置了dyno并且还完成了rake db:migrate.

日志中有一些重复的东西,但我只是不知道从中读出什么.任何人都知道问题出在哪里?任何指导将不胜感激.请参阅下面的日志.

Jun 18 15:51:54 snapclass-production app/heroku-postgres:  source=HEROKU_POSTGRESQL_WHITE measure.current_transaction=1077 measure.db_size=6153016bytes measure.tables=0 measure.active-connections=3 measure.waiting-connections=0 measure.index-cache-hit-rate=0.99981 measure.table-cache-hit-rate=0.99349
Jun 18 15:52:06 snapclass-production heroku/router:  at=error code=H10 desc="App crashed" method=GET path=/ host=www.snapclass.com fwd="46.165.195.139" dyno= connect= service= status=503 bytes= 
Jun 18 15:52:07 snapclass-production heroku/router:  at=error code=H10 desc="App crashed" method=GET path=/ host=www.snapclass.com fwd="178.255.152.2" dyno= connect= service= status=503 bytes= 
Jun 18 15:52:12 snapclass-production app/postgres:  [47-1]  [] LOG:  checkpoint starting: time 
Jun 18 15:52:13 snapclass-production app/postgres:  [48-1]  [] LOG:  checkpoint complete: wrote 0 buffers (0.0%); 0 transaction …
Run Code Online (Sandbox Code Playgroud)

heroku heroku-postgres

19
推荐指数
3
解决办法
4万
查看次数

Heroku + Sidekiq:ActiveRecord :: StatementInvalid:PG :: UnableToSend:SSL SYSCALL错误:检测到EOF

嗨,我们正在使用独角兽和Sidekiq在Heroku的Cedar堆栈上运行.我们间歇性地得到以下错误

BurnThis ActiveRecord::StatementInvalid: PG::UnableToSend: SSL SYSCALL error: EOF detected

ActiveRecord::StatementInvalid: PG::ConnectionBad: PQconsumeInput() SSL SYSCALL error: Connection timed out
Run Code Online (Sandbox Code Playgroud)

有没有人知道这些错误的直接原因是什么?与我们的数据库连接太多了吗?我们已经通过以下方式设置了分叉:

unicorn.rb

worker_processes Integer(ENV["WEB_CONCURRENCY"] || 3)
timeout 30
preload_app true

before_fork do |server, worker|
  Signal.trap 'TERM' do
    puts 'Unicorn master intercepting TERM and sending myself QUIT instead'
    Process.kill 'QUIT', Process.pid
  end

  defined?(ActiveRecord::Base) and
    ActiveRecord::

Base.connection.disconnect!
end

after_fork do |server, worker|
  Signal.trap 'TERM' do
    puts 'Unicorn worker intercepting TERM and doing nothing. Wait for master to send QUIT'
  end

  # other setup
  if …
Run Code Online (Sandbox Code Playgroud)

connection-pooling heroku rails-postgresql rails-activerecord heroku-postgres

18
推荐指数
1
解决办法
5789
查看次数

heroku计划有多少磁盘空间?

我创建了一个类似DMS(文档管理系统)的应用程序,所以我的客户端将上传PDF,XLS和DOC.

heroku heroku-postgres

15
推荐指数
4
解决办法
2万
查看次数

无法使用sequelize从本地节点应用程序连接到heroku postgresql数据库

我正在尝试使用Sequelize从本地nodejs应用程序连接到Heroku postgresql数据库.我按照这两个指南,一切都在heroky服务器端工作得很好,但是当我在Mac上本地运行时,我的节点应用程序将无法连接到heroku.

以下是我启动本地应用的方法:

DATABASE_URL=$(heroku config:get DATABASE_URL) nodemon
Run Code Online (Sandbox Code Playgroud)

得到我:

Sequelize: Unable to connect to the database:
Run Code Online (Sandbox Code Playgroud)

但是通过这样做我得到了正确的URL:

echo $(heroku config:get DATABASE_URL)
Run Code Online (Sandbox Code Playgroud)

这些命令工作正常:

heroku pg:psql
psql $(heroku config:get DATABASE_URL)
Run Code Online (Sandbox Code Playgroud)

这是我的nodejs代码:

var match = process.env.DATABASE_URL.match(/postgres:\/\/([^:]+):([^@]+)@([^:]+):(\d+)\/(.+)/)
sequelize = new Sequelize(match[5], match[1], match[2], {
    dialect:  'postgres',
    protocol: 'postgres',
    port:     match[4],
    host:     match[3],
    logging: false
})

sequelize
.authenticate()
.complete(function(err) {
    if (!!err) {
        log('Sequelize: Unable to connect to the database:', err);
    } else {
        http.listen(process.env.PORT || config.server.port, function(){
            log('Web server listening on port '+process.env.PORT …
Run Code Online (Sandbox Code Playgroud)

postgresql heroku node.js sequelize.js heroku-postgres

15
推荐指数
3
解决办法
8634
查看次数

在Heroku上将hobby-dev升级为业余爱好

我仍然围绕着Heroku的计划.但我知道我将在db中拥有大约3M行,所以我需要从hobby-dev升级到hobby-basic.

但是,我找不到任何有关此级别升级的文档或帮助.只有从爱好到标准的文档.

我是否需要创建一个新的PG Add-On然后消灭我的hobby-dev数据库?

heroku heroku-postgres

14
推荐指数
1
解决办法
2611
查看次数

将数据库推送到heroku:如何使用heroku pg:push

我想使用heroku pg:push命令将我的本地postgresql数据库推送到heroku .该命令如下所示:heroku pg:push mylocaldb DATABASE --app sushi根据heroku文档:https://devcenter.heroku.com/articles/heroku-postgresql .

这是我的本地数据库信息:

Name: mysitedb
User: bill
Password: bill
Run Code Online (Sandbox Code Playgroud)

我机器中的DATABASE_URL环境变量设置为:postgres://bill:bill@localhost/mysitedb.

我的应用程序名称是secure-gorge-4090.我试过了heroku pg:push mysitedb DATABASE --app secure-gorge-4090.输出是:

 !    Remote database is not empty.
 !    Please create a new database, or use `heroku pg:reset`
Run Code Online (Sandbox Code Playgroud)

我很惊讶我没有把任何东西放进我的数据库中.但我仍然跑去heroku pg:reset DATABASE重置我的DATABASE.之后,我heroku pg:push mysitedb DATABASE --app secure-gorge-4090再次尝试但输出仍然相同.

我试过了heroku pg:push postgres://bill:bill@localhost:8000/mysitedb DATABASE --app secure-gorge-4090.输出是:

!    LOCAL_SOURCE_DATABASE is not a valid database name
Run Code Online (Sandbox Code Playgroud)

我不知道如何使用此命令将我的本地数据库移动到heroku.我需要你的帮助.谢谢!

heroku database-migration heroku-postgres

13
推荐指数
2
解决办法
1万
查看次数

Heroku多区域支持

Heroku是否为其实施提供多区域支持?我对多个AWS区域中的master-master数据库设置特别感兴趣.

谢谢

database heroku amazon-web-services multi-master-replication heroku-postgres

12
推荐指数
1
解决办法
1156
查看次数

如何在Heroku中使用Laravel4的php artisan migrate命令?

我正在起诉Heroku开发计划使用PostgreSQL创建数据库.数据库是在Heroku中创建的.运行heroku pg:info命令后

$ heroku pg:info
=== HEROKU_POSTGRESQL_XXX_URL
Plan:        Hobby-dev
Status:      available
Connections: 1
PG Version:  9.3.1
Created:     2013-11-27 04:00 UTC
Data Size:   6.4 MB
Tables:      0
Rows:        0/10000 (In compliance)
Fork/Follow: Unsupported
Rollback:    Unsupported
Run Code Online (Sandbox Code Playgroud)

结果显示零表,这是正确的.

在我的本地机器表中,使用Laravel4框架支持的以下命令创建表.

php工匠迁移

php artisan db:种子

但似乎我无法在heroku中运行此命令来创建表和转储数据.请告诉我如何在Heroku中创建本地数据库的副本.

谢谢大家

heroku heroku-toolbelt laravel-4 heroku-postgres

12
推荐指数
4
解决办法
1万
查看次数

如何创建或管理heroku_postgres数据库实例

我正在开发一个在Heroku上运行的简单PHP应用程序.我创建了一个CSV文件,并将其用作简单的数据库.

现在我想在Heroku上创建一个数据库,所以我添加了一个Postgres实例,它的名字是heroku-postgres-9f90a33a::ivory.

我想知道如何创建和管理我的数据库实例以执行创建表等操作.

heroku-postgres

12
推荐指数
1
解决办法
2万
查看次数

heroku rake db:结构:加载失败

我需要使用一些PostgreSQL专有功能,例如规则和触发器来进行表分区.只要我知道,这些功能无法转储到schema.rb,所以我将schema_format配置参数更改为:sql.

现在,当我尝试加载rake db:structure:load将生成的structure.sql加载到heroku数据库时,它失败了:sh:psql:not found

我该怎么做?

heroku ruby-on-rails-3.2 heroku-postgres

10
推荐指数
1
解决办法
826
查看次数