Comments (8)
Thanks @Naren1997! 🙏 Going to check these and will let you know.
from solid_queue.
Aha! Great catch! Thanks a lot for letting me know, this can be helpful in the future in case someone else runs into this 🙏
from solid_queue.
Huh, this is very strange 😕 I'm not sure I understand the logs very well. I see this error:
undefined method puts_log' for #<ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
Is it because the ibm_db
adapter is using a PostgreSQL adapter under the hood?
One thing, before we dig deeper: could you upgrade Solid Queue to the latest version? 0.3.4. You might need to run some extra migrations for that.
from solid_queue.
Another thing that might help is to try to enqueue a job with ActiveRecord::Base.logger.level = :debug
in your console, and include the full logs from the job insertion, no need to include the whole ctiveRecord::ConnectionAdapters::PostgreSQLAdapter
object, which is pretty big.
from solid_queue.
Hello @rosa Thanks for your assistance!
I tried with upgrading the solidqueue version to 0.3.4(and rails version to 7.1.3.4), still I'm facing the same issue. Attaching my full debug log (i have included PostgreSQLAdapter log as well)
full_log_on_insert.txt
Indeed it looks like PostgreSQLAdapter is trying to call the method in ibm_db2 adaptor, but I don't see issue when I use good_jobs
from solid_queue.
Hey @Naren1997, would you mind copying the output of
SolidQueue::Job.connection.raw_connection
from your development console? I think that'll confirm the PostgreSQL adapter is being used 🤔
From the full logs, looks like the INSERT
is at least happening on PostgreSQL:
INSERT INTO "solid_queue_jobs" ("queue_name", "class_name", "arguments", "priority", "active_job_id", "scheduled_at", "finished_at", "concurrency_key", "created_at", "updated_at")
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id"
because I don't think IBM DB2 supports RETURNING
. However, the ibm_db
adapter is somehow being mixed with that, how puzzling! The create_savepoint
method is being called because there's a callback on SolidQueue::Job
: after creating the job we prepare it for execution, which creates other records. The update
operation doesn't trigger any callbacks, thus no save points, and no errors.
Do you have any models in your app that trigger any callbacks before/after saving to save other models? Wondering if you could test with those and see if the same thing happens.
I think GoodJob doesn't run any callbacks when inserting jobs so that might be a reason this is not happening, but I'm not sure.
from solid_queue.
Hello @rosa Yeah I noticed for other models if I have a callback that has the logic to call the create_savepoint it is giving the same error. It looks the issue is with the ibm_db2 package, they have written this https://github.com/ibmdb/ruby-ibmdb/blob/master/IBM_DB_Adapter/ibm_db/lib/active_record/connection_adapters/ibm_db_adapter.rb#L502 code such that it'll override the actual https://github.com/rails/rails/blob/main/activerecord/lib/active_record/connection_adapters/abstract/savepoints.rb#L6
I'll open an issue with ibm_db2.
Thank you much for your support!
from solid_queue.
Issue is with ibm_db2 package
from solid_queue.
Related Issues (20)
- Puma plugin causes warning about unresolved or ambiguous Gem specs HOT 1
- Store actual exception instead of full `retry_on` condition HOT 2
- Cron tasks can give weird errors if enqueue fails HOT 5
- Solid Queue isn't processing jobs in queues HOT 2
- Deleting scheduled jobs HOT 1
- Database pool size in multi workers setup HOT 2
- Stopping in progress job HOT 3
- Not Finding Recurring Jobs HOT 3
- Best way to delete an old queue HOT 2
- Feature Request: Automatic Worker Process Recycling HOT 6
- urls for corresponding classes? HOT 4
- `PG::ConnectionBad` error when restarting container running `solid_queue:start` HOT 15
- NoMethodError from application.active_support #3 undefined method `unblock_next_blocked_job' for nil HOT 13
- Persistent "Key (job_id) already exists" error when claiming jobs HOT 6
- DB connection pool size HOT 2
- Wrong upgrade url HOT 2
- On 0.4 Errno::ECHILD errors are popping up HOT 9
- Execute polling queries to ReadReplica HOT 2
- NameError uninitialized constant X, but works several minutes later on retry HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from solid_queue.