PgHero

rgmvisserBIZCLASS

7 months ago

Description: A performance dashboard for Postgres

Category: Observability

URL: https://railway.app/template/QUJmGE

7 Replies

sameerkumar18PRO

a month ago

Hey Railway Team - the Pghero template doesn't seem to be working - fails at healthcheck


rgmvisserBIZCLASS

a month ago

Hi @sameerkumar18,

I just tested it and it's working for me. Could you attach your deployment logs to see where it might go wrong?


rgmvisser

Hi @sameerkumar18,I just tested it and it's working for me. Could you attach your deployment logs to see where it might go wrong?

sameerkumar18PRO

a month ago

Deploy Logs

Starting Container

Apr 02 13:07:18

[1] Puma starting in cluster mode...

Apr 02 13:07:18

[1] * Puma version: 6.6.0 ("Return to Forever")

Apr 02 13:07:18

[1] * Ruby version: ruby 3.3.7 (2025-01-15 revision be31f993d7) [x86_64-linux-musl]

Apr 02 13:07:18

[1] * Min threads: 1

Apr 02 13:07:18

[1] * Max threads: 16

Apr 02 13:07:18

[1] * Environment: production

Apr 02 13:07:18

[1] * Master PID: 1

Apr 02 13:07:18

[1] * Workers: 3

Apr 02 13:07:18

[1] * Restarts: () hot () phased

Apr 02 13:07:18

[1] * Preloading application

Apr 02 13:07:20

[1] ! Unable to load application: ActiveRecord::AdapterNotSpecified: database configuration does not specify adapter

Apr 02 13:07:20

/usr/local/bundle/gems/activerecord-8.0.2/lib/active_record/connection_adapters/abstract/connection_handler.rb:278:in `resolve_pool_config': database configuration does not specify adapter (ActiveRecord::AdapterNotSpecified)

Apr 02 13:07:20

from /usr/local/bundle/gems/activerecord-8.0.2/lib/active_record/connection_adapters/abstract/connection_handler.rb:118:in `establish_connection'

Apr 02 13:07:20

from /usr/local/bundle/gems/activerecord-8.0.2/lib/active_record/connection_handling.rb:53:in `establish_connection'

Apr 02 13:07:20

from /usr/local/bundle/gems/activerecord-8.0.2/lib/active_record/railtie.rb:260:in `block (2 levels) in <class:Railtie>'

Apr 02 13:07:20

from /usr/local/bundle/gems/activesupport-8.0.2/lib/active_support/lazy_load_hooks.rb:97:in `class_eval'

Apr 02 13:07:20

from /usr/local/bundle/gems/activesupport-8.0.2/lib/active_support/lazy_load_hooks.rb:97:in `block in execute_hook'

Apr 02 13:07:20

from /usr/local/bundle/gems/activerecord-8.0.2/lib/active_record/base.rb:15:in `<top (required)>'

Apr 02 13:07:20

from /usr/local/bundle/gems/activesupport-8.0.2/lib/active_support/lazy_load_hooks.rb:87:in `with_execution_control'

Apr 02 13:07:20

from /usr/local/bundle/gems/zeitwerk-2.7.2/lib/zeitwerk/core_ext/kernel.rb:34:in `require'

Apr 02 13:07:20

from /usr/local/bundle/gems/activesupport-8.0.2/lib/active_support/lazy_load_hooks.rb:92:in `execute_hook'

Apr 02 13:07:20

from /usr/local/bundle/gems/zeitwerk-2.7.2/lib/zeitwerk/core_ext/kernel.rb:34:in `require'

Apr 02 13:07:20

from /usr/local/bundle/gems/pghero-3.6.2/lib/pghero.rb:147:in `default_config'

Apr 02 13:07:20

from /usr/local/bundle/gems/activesupport-8.0.2/lib/active_support/lazy_load_hooks.rb:78:in `block in run_load_hooks'

Apr 02 13:07:20

from /usr/local/bundle/gems/pghero-3.6.2/lib/pghero.rb:111:in `config'

Apr 02 13:07:20

from /usr/local/bundle/gems/activesupport-8.0.2/lib/active_support/lazy_load_hooks.rb:77:in `each'

Apr 02 13:07:20

from /usr/local/bundle/gems/pghero-3.6.2/lib/pghero/engine.rb:20:in `block in <class:Engine>'

Apr 02 13:07:20

from /usr/local/bundle/gems/activesupport-8.0.2/lib/active_support/lazy_load_hooks.rb:77:in `run_load_hooks'

Apr 02 13:07:20

from /usr/local/bundle/gems/railties-8.0.2/lib/rails/initializable.rb:32:in `instance_exec'

Apr 02 13:07:20

from /usr/local/bundle/gems/activerecord-8.0.2/lib/active_record/base.rb:337:in `<module:ActiveRecord>'

Apr 02 13:07:20

from /usr/local/bundle/gems/railties-8.0.2/lib/rails/initializable.rb:32:in `run'

Apr 02 13:07:20

from /usr/local/bundle/gems/railties-8.0.2/lib/rails/initializable.rb:61:in `block in run_initializers'

Apr 02 13:07:20

from /usr/local/lib/ruby/3.3.0/tsort.rb:231:in `block in tsort_each'

Apr 02 13:07:20

from /usr/local/lib/ruby/3.3.0/tsort.rb:353:in `block (2 levels) in each_strongly_connected_component'

Apr 02 13:07:20

from /usr/local/lib/ruby/3.3.0/tsort.rb:229:in `tsort_each'

Apr 02 13:07:20

from /usr/local/lib/ruby/3.3.0/tsort.rb:434:in `each_strongly_connected_component_from'

Apr 02 13:07:20

from /usr/local/lib/ruby/3.3.0/tsort.rb:208:in `tsort_each'

Apr 02 13:07:20

from /usr/local/lib/ruby/3.3.0/tsort.rb:352:in `block in each_strongly_connected_component'

Apr 02 13:07:20

from /usr/local/lib/ruby/3.3.0/tsort.rb:350:in `each'


sameerkumar18PRO

a month ago

Build Logs:

```

Apr 02 13:07:17

====================

Apr 02 13:07:17

Starting Healthcheck

Apr 02 13:07:17

====================

Apr 02 13:07:17

Apr 02 13:07:17

Path: /health

Apr 02 13:07:17

Retry window: 5m0s

Apr 02 13:07:17

Apr 02 13:07:20

Attempt #1 failed with service unavailable. Continuing to retry for 4m56s

Apr 02 13:07:29

Attempt #2 failed with service unavailable. Continuing to retry for 4m48s

Apr 02 13:07:41

Attempt #3 failed with service unavailable. Continuing to retry for 4m36s

Apr 02 13:07:55

Attempt #4 failed with service unavailable. Continuing to retry for 4m22s

Apr 02 13:08:03

Attempt #5 failed with service unavailable. Continuing to retry for 4m14s

Apr 02 13:08:19

Attempt #6 failed with service unavailable. Continuing to retry for 3m58s

Apr 02 13:08:49

Attempt #7 failed with service unavailable. Continuing to retry for 3m28s

Apr 02 13:09:19

Attempt #8 failed with service unavailable. Continuing to retry for 2m58s

Apr 02 13:09:49

Attempt #9 failed with service unavailable. Continuing to retry for 2m28s

Apr 02 13:10:19

Attempt #10 failed with service unavailable. Continuing to retry for 1m57s

Apr 02 13:10:49

Attempt #11 failed with service unavailable. Continuing to retry for 1m27s

Apr 02 13:11:19

Attempt #12 failed with service unavailable. Continuing to retry for 57s

Apr 02 13:11:49

Attempt #13 failed with service unavailable. Continuing to retry for 27s

Apr 02 13:11:49

Apr 02 13:11:49

1/1 replicas never became healthy!

Apr 02 13:11:49

Healthcheck failed!```


sameerkumar18PRO

a month ago

Attaching screenshot:

Attachments


rgmvisserBIZCLASS

a month ago

Looks like the healthcheck is working as expected as there is a DB connection error:
Apr 02 13:07:20

[1] ! Unable to load application: ActiveRecord::AdapterNotSpecified: database configuration does not specify adapter

Apr 02 13:07:20

/usr/local/bundle/gems/activerecord-8.0.2/lib/active_record/connection_adapters/abstract/connection_handler.rb:278:in `resolve_pool_config': database configuration does not specify adapter (ActiveRecord::AdapterNotSpecified)

Not sure what you have DATABASE_URL environment variable you have set, but this should be the URL your Postgres server gives you (I recommend the internal URL)


sameerkumar18PRO

a month ago

Ah, that was exactly the issue!

I mistakenly put DB Host instead of the complete PSQL URI sequence (
postgresql://[username[:password]@]host[:port]/database )
Just fixing the URL made it work - Thanks so much for your help!


PgHero - Railway Help Station