Git Product home page Git Product logo

Comments (7)

henryoswald avatar henryoswald commented on June 27, 2024

Hey, we are probably going to start working on this soon as its becoming a problem for us. Would you be ok with the different locking mechanism?

from fairy.

baoshan avatar baoshan commented on June 27, 2024

Sorry! I missed the issue for 3 months! Does your project still need a workaround? Please let me know.

from fairy.

baoshan avatar baoshan commented on June 27, 2024

The locking mechanism is promising I think. But the blocking behavior is by design and there's a reschedule method to restart the blocked tasks. Does that decision suite your needs?

from fairy.

jpallen avatar jpallen commented on June 27, 2024

We found that we had problems with the queues getting stuck, as I mentioned. We haven't been able to track down how these got into an inconsistent state, where the FAIRY:QUEUE:* lists has elements in them but no fairy worker was processing them. Using a locking mechanism would be a partial fix for this since it would be more robust to stuck queues.

Yes, we managed to get around it by calling reschedule regularly when we need to, but it's still a workaround rather than a solution to the underlying problem.

We're also seeing trouble with the workers getting stuck regularly for some reason. We still haven't figured out why, but after a while, and at random intervals, the 5 workers that we have running have all stopped processing anything. A restart of our worker process sets everything going again, but it's not clear what the problem is here. We will keep you updated as we find out more.

from fairy.

baoshan avatar baoshan commented on June 27, 2024

Are there any FAIRY:PROCESSING:* keys when workers are stuck? That may because workers haven't callback for some reason. Could you please post a keys * result when the problem happens?

pub/sub rather than polling is definitely the right way to improve. That'll be done in the next version. But I'm afraid a timeout locking is not always better. Sometimes tasks show vast differences in demanding of processing time.

Thanks.

from fairy.

jpallen avatar jpallen commented on June 27, 2024

I don't think so - I think the only keys set were the FAIRY:QUEUE:* keys. It's been a while since we investigated this though since we've been running with the above workaround for a while now. I'll try to get you more debugging data next time we look into this.

Thanks a lot.

from fairy.

ducdigital avatar ducdigital commented on June 27, 2024

@baoshan @jpallen have you ever implemented the lock?

https://github.com/mike-marcacci/node-redlock This might help?

from fairy.

Related Issues (8)

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.