Coder Social home page Coder Social logo

Comments (10)

stephankaag avatar stephankaag commented on June 3, 2024

Same issue overhere.

from delayed_job.

scottj97 avatar scottj97 commented on June 3, 2024

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.

sheldonh avatar sheldonh commented on June 3, 2024

When the MySQL server times the connection out, as per the MySQL server's configured wait_timeout setting.

from delayed_job.

scottj97 avatar scottj97 commented on June 3, 2024

Doesn't DJ continuously poll the MySQL server? Why would it time out?

from delayed_job.

sheldonh avatar sheldonh commented on June 3, 2024

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.

bkeepers avatar bkeepers commented on June 3, 2024

Sounds like this isn't necessarily a dj issue. Reopen if I'm wrong

from delayed_job.

andrewroth avatar andrewroth commented on June 3, 2024

what's the workaround?

from delayed_job.

bracken avatar bracken commented on June 3, 2024

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.

bkeepers avatar bkeepers commented on June 3, 2024

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.

sheldonh avatar sheldonh commented on June 3, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.