a year ago
Description: A performance dashboard for Postgres
Category: Observability
7 Replies
10 months ago
Hey Railway Team - the Pghero template doesn't seem to be working - fails at healthcheck
10 months 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?
10 months ago
Deploy Logs
Starting Container
[1] Puma starting in cluster mode...
[1] * Puma version: 6.6.0 ("Return to Forever")
[1] * Ruby version: ruby 3.3.7 (2025-01-15 revision be31f993d7) [x86_64-linux-musl]
[1] * Min threads: 1
[1] * Max threads: 16
[1] * Environment: production
[1] * Master PID: 1
[1] * Workers: 3
[1] * Restarts: (
) hot (
) phased
[1] * Preloading application
[1] ! Unable to load application: ActiveRecord::AdapterNotSpecified: database configuration does not specify adapter
/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)
from /usr/local/bundle/gems/activerecord-8.0.2/lib/active_record/connection_adapters/abstract/connection_handler.rb:118:in `establish_connection'
from /usr/local/bundle/gems/activerecord-8.0.2/lib/active_record/connection_handling.rb:53:in `establish_connection'
from /usr/local/bundle/gems/activerecord-8.0.2/lib/active_record/railtie.rb:260:in `block (2 levels) in <class:Railtie>'
from /usr/local/bundle/gems/activesupport-8.0.2/lib/active_support/lazy_load_hooks.rb:97:in `class_eval'
from /usr/local/bundle/gems/activesupport-8.0.2/lib/active_support/lazy_load_hooks.rb:97:in `block in execute_hook'
from /usr/local/bundle/gems/activerecord-8.0.2/lib/active_record/base.rb:15:in `<top (required)>'
from /usr/local/bundle/gems/activesupport-8.0.2/lib/active_support/lazy_load_hooks.rb:87:in `with_execution_control'
from /usr/local/bundle/gems/zeitwerk-2.7.2/lib/zeitwerk/core_ext/kernel.rb:34:in `require'
from /usr/local/bundle/gems/activesupport-8.0.2/lib/active_support/lazy_load_hooks.rb:92:in `execute_hook'
from /usr/local/bundle/gems/zeitwerk-2.7.2/lib/zeitwerk/core_ext/kernel.rb:34:in `require'
from /usr/local/bundle/gems/pghero-3.6.2/lib/pghero.rb:147:in `default_config'
from /usr/local/bundle/gems/activesupport-8.0.2/lib/active_support/lazy_load_hooks.rb:78:in `block in run_load_hooks'
from /usr/local/bundle/gems/pghero-3.6.2/lib/pghero.rb:111:in `config'
from /usr/local/bundle/gems/activesupport-8.0.2/lib/active_support/lazy_load_hooks.rb:77:in `each'
from /usr/local/bundle/gems/pghero-3.6.2/lib/pghero/engine.rb:20:in `block in <class:Engine>'
from /usr/local/bundle/gems/activesupport-8.0.2/lib/active_support/lazy_load_hooks.rb:77:in `run_load_hooks'
from /usr/local/bundle/gems/railties-8.0.2/lib/rails/initializable.rb:32:in `instance_exec'
from /usr/local/bundle/gems/activerecord-8.0.2/lib/active_record/base.rb:337:in `<module:ActiveRecord>'
from /usr/local/bundle/gems/railties-8.0.2/lib/rails/initializable.rb:32:in `run'
from /usr/local/bundle/gems/railties-8.0.2/lib/rails/initializable.rb:61:in `block in run_initializers'
from /usr/local/lib/ruby/3.3.0/tsort.rb:231:in `block in tsort_each'
from /usr/local/lib/ruby/3.3.0/tsort.rb:353:in `block (2 levels) in each_strongly_connected_component'
from /usr/local/lib/ruby/3.3.0/tsort.rb:229:in `tsort_each'
from /usr/local/lib/ruby/3.3.0/tsort.rb:434:in `each_strongly_connected_component_from'
from /usr/local/lib/ruby/3.3.0/tsort.rb:208:in `tsort_each'
from /usr/local/lib/ruby/3.3.0/tsort.rb:352:in `block in each_strongly_connected_component'
from /usr/local/lib/ruby/3.3.0/tsort.rb:350:in `each'
10 months 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!```
10 months 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
/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)
10 months 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!
