Skip to content
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

pg_xact No Such File error in logs #709

Closed
kevinjbayer opened this issue Aug 29, 2022 · 3 comments
Closed

pg_xact No Such File error in logs #709

kevinjbayer opened this issue Aug 29, 2022 · 3 comments

Comments

@kevinjbayer
Copy link

Hello,

From what I can tell, good_job still seems to be running and working correctly, but my logs are being hammered by the following error:

DETAIL:  Could not open file "pg_xact/014D": No such file or directory.
INFO -- : [GoodJob] Notifier subscribed with LISTEN
INFO -- : [GoodJob] Notifier unsubscribed with UNLISTEN
ERROR -- : [GoodJob] Notifier errored: PG::UndefinedFile: ERROR:  could not access status of transaction 349255505

Tried upgrading all gems in the project (was on good_job 3.0.0), but it's still happening and it's added the path to the error now. This is just a portion in case it helps troubleshoot:

["/app/vendor/bundle/ruby/3.1.0/gems/activerecord-[7.0.3.1]/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `exec'", "/app/vendor/bundle/ruby/3.1.0/gems/activerecord-[7.0.3.1]/lib/active_record/connection_adapters/postgresql/database_statements.rb:48:in `block (2 levels) in execute'", "/app/vendor/bundle/ruby/3.1.0/gems/activesupport-[7.0.3.1]/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'"

Any insights? Can I remove whatever is looking for pg_xact/014D? This is hosted on Heroku. Thanks!

@bensheldon
Copy link
Owner

@kevinjbayer hmm, I have not seen that error before. From searching around, it looks like it's a problem with your Postgres instance: https://postgrespro.com/list/thread-id/2546853

I'd recommend you open up a support ticket with Heroku. From that thread, it seems like restarting the database is the recommended action. Hopefully Heroku Support can help with that on a managed database.

@kevinjbayer
Copy link
Author

@bensheldon Thanks for taking a peek. I couldn't figure out a fix and I doubt Heroku support would do much on a free hobby level database, so I unfortunately switched over to Sidekiq for the time being. Wish I knew exactly what caused this, though, as I love the idea of keeping it all in Postgres and not needing Redis for background jobs.

Closing this for the time being.

@bensheldon
Copy link
Owner

@kevinjbayer bummer. No worries, I understand your desire to move forward.

Another thought, in case someone else experiences this, is to change the channel GoodJob LISTENs on to workaround the problem.

GoodJob::Notifier::CHANNEL = "good_job_workaround"

It'll print a warning about redefining the constant, but I think it might work around the problem of the default channel being haunted in your Postgres.

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

No branches or pull requests

2 participants