Skip to content

Queue DB schema is not loaded into secondary DB with default config #557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
thisismydesign opened this issue May 3, 2025 · 2 comments
Closed

Comments

@thisismydesign
Copy link

thisismydesign commented May 3, 2025

New rails 8.0.2 project with defaults. solid_queue (1.1.5). queue_schema.rb is generated. Using a separate queue DB. db:prepare does not load the schema for the queue db. Locally, I could do db:schema:load:queue, but in production (default kamal deployment) I get:

DISABLE_DATABASE_ENVIRONMENT_CHECK=1 bin/rails db:schema:load:queue
bin/rails aborted!
ActiveRecord::ConnectionNotEstablished: connection to server at "172.18.0.10", port 5432 failed: FATAL:  password authentication failed for user "postgres" (ActiveRecord::ConnectionNotEstablished)


Caused by:
PG::ConnectionBad: connection to server at "172.18.0.10", port 5432 failed: FATAL:  password authentication failed for user "postgres" (PG::ConnectionBad)

Tasks: TOP => db:schema:load:queue => db:test:purge:queue
(See full trace by running task with --trace)

It tries to purge the test db even though it's in production.

@rosa
Copy link
Member

rosa commented May 3, 2025

@thisismydesign, looks like this is not related to Solid Queue, but to your DB configuration.

PG::ConnectionBad: connection to server at "172.18.0.10", 
port 5432 failed: FATAL:  password authentication failed for user "postgres" 
(PG::ConnectionBad)

It seems you have configured the wrong credentials in database.yml.

@thisismydesign
Copy link
Author

It tries to run db:test:purge:queue, a task on the test DB, despite RAILS_ENV=production. Then it fails with an authentication error, because it can't authenticate to the prod db using the test config in database.yml.

But I guess that's a rails issue, not solid queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants