Giter Site home page Giter Site logo

Comments (4)

jmettraux avatar jmettraux commented on May 18, 2024

Hello, I would need more details. Could you please gist your exact test script?

I don't have a Ubuntu 12.04, I'll try on a Debian system.

Thanks in advance.

from rufus-scheduler.

jamilbk avatar jamilbk commented on May 18, 2024

It's probably something to do with how my unicorn+nginx setup is spawning processes, but the inner workings of Ruby threads are a bit over my head.

Here's the gist: git://gist.github.com/2584148.git

And thanks for the prompt reply. :-)

from rufus-scheduler.

jmettraux avatar jmettraux commented on May 18, 2024

Well... I guess your Unicorn is spawning multiple Ruby runtimes. Let's say it's spawning 4 Ruby runtimes, at that point you'll have 4 schedulers.

Since the runtimes are spawns, the instances are copies, but the rufus-scheduler thread is not started, that's probably why you need to do "start". At some points your runtimes will get killed by Unicorn (new runtimes will get started), it depends on your configuration. When a runtime exits, its rufus-scheduler's jobs will get lost as well.

I'm guessing that your development environment is served by a plain Webrick while your production environment is Unicorn + Nginx.

I invite you to carefully read your Unicorn documentation, to learn about the Unix process model and to learn about Ruby threads. You cannot go on with such knowledge being over your head.

Please level up and/or look at alternatives.

I noticed you're using resque, why not take a look at https://github.com/bvandenbos/resque-scheduler ? It's a resque + rufus-scheduler integration.

Cheers,

John

from rufus-scheduler.

jamilbk avatar jamilbk commented on May 18, 2024

Hey John,

Great feedback. Thanks.

I gave resque-scheduler a try but was having a hard time finding a good way to start the scheduler and keep it running with capistrano. Will keep up the fun

from rufus-scheduler.

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.