Comments (10)
Same issue overhere.
from delayed_job.
See line 64 of lib/delayed/command.rb. Looks like it's trying to reconnect.
When exactly do you have a problem? I tried restarting my app after launching delayed_job, and that did not seem to cause any problems. Delayed jobs still get run.
from delayed_job.
When the MySQL server times the connection out, as per the MySQL server's configured wait_timeout setting.
from delayed_job.
Doesn't DJ continuously poll the MySQL server? Why would it time out?
from delayed_job.
Aha! Found it. The application uses two databases (on two different servers). DJ isn't being timed out by the server on which the delayed_jobs table exists; but one of the delayed jobs accesses a legacy database, on another server, and that's where the timeout occurs.
from delayed_job.
Sounds like this isn't necessarily a dj issue. Reopen if I'm wrong
from delayed_job.
what's the workaround?
from delayed_job.
I had this problem too because our delayed_job table is in a different database than our app. For those looking, here is my simple fix: http://github.com/bracken/delayed_job/commit/b73a7e561b89fc09ae77bb9c1cfc680062867e19
You could do the same thing in your custom daemons so that you can still use the main delayed_job branch.
from delayed_job.
For those still having this issue, make sure you try this first: http://guides.rubyonrails.org/2_3_release_notes.html#reconnecting-mysql-connections
from delayed_job.
Bracken's take on the issue makes the world of sense. Our problem is also from using multiple databases, where the jobs aren't stored in the database that the in-job code interacts with.
from delayed_job.
Related Issues (20)
- delayed_job script and latest daemons gem HOT 2
- Worker crashes and keeps poison-pill-job in queue
- using DelayedJob results in multiple email Amazon SES HOT 1
- Delayed job failing after successful completion.
- missing __delay__ alias method in performable_mailer.rb for delay method.
- Is there a best practice for a multi-master setup? HOT 1
- DelayedJob kube containers not able to handle SIGQUITs and terminate abruptly
- Race condition but how to debug?
- Timeout doesn't halt job when max_run_time is reached HOT 1
- How does max_attempts interface with ActiveJob retry_on method? HOT 3
- Suggestion: Rake task to lauch multiple monitored workers in a container context
- Allow identifier with multiple workers HOT 7
- When shunting dj logs to their own file, the active record lines remain in the dev.log HOT 2
- Suggestion: Issue Maintenance on Github
- Delayed Job records are getting duplicated in production rails app HOT 1
- Can we set max_attempt at the Job or Queue level? [This is a question - not an issue]
- Date#to_s deprecation warning for queuing method calls on objects containing dates
- Issue with jobs running at random times (early, ahead of schedule)?
- How to use delayed_job with decidim ? [ Question ] HOT 1
- Job-level max_run_time not being taken into account after worker crash.
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 delayed_job.