Giter Site home page Giter Site logo

Comments (4)

jbittel avatar jbittel commented on August 15, 2024

Interesting...I don't currently run these two together, so I've not encountered this before. Did you try running celery with the "-P gevent" option? Is that what you mean by switching to threaded workers?

On the plus side, gevent isn't required for django-mama-cas operation, but it can certainly make SLO requests happen faster.

from django-mama-cas.

Mihara avatar Mihara commented on August 15, 2024

Threaded workers is -P thread. -P gevent just crashes.

Django-rq exhibits a similar problem, which also persists on gevent 1.1rc5 when I use memcached for session storage, which is why I caught this much later.

The problem isn't that gevent is required or not required, it's that if it is required by anything else, django-mama-cas will use it, and monkeypatch it in, (whether that anything else monkeypatches it in or not) with pretty unpredictable results...

I'm going to investigate what happens if I monkeypatch everything globally all the way up in gunicorn, which will ensure, at least, that everything is monkeypatched early, but I don't really have high hopes for this. I'd have much better hopes for https://github.com/i-trofimtschuk/frequests but django-mama-cas isn't structured to take advantage of that easily.

from django-mama-cas.

jbittel avatar jbittel commented on August 15, 2024

Did you have any success monkeypatching earlier in the process?

The simplest idea to sidestep this would be to add a "don't use gevent" setting to forcibly ignore it even if it's present because of some other requirement.

from django-mama-cas.

Mihara avatar Mihara commented on August 15, 2024

Haven't had the opportunity to do that yet, and probably won't for a week more. :(

A setting to disable gevent even if present would be a workable stopgap measure, though I think that actually using gevent without monkeypatching would be the preferable solution.

from django-mama-cas.

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.