Giter Club home page Giter Club logo

Comments (8)

rebkwok avatar rebkwok commented on August 25, 2024 1

This seems related to https://code.djangoproject.com/ticket/15894
It happens to us too on occasion, although we had thought it was related to our database routing set up.

from django-multisite.

ziima avatar ziima commented on August 25, 2024

Same here. Looks like a race condition in _get_site_by_id. We're not quite sure, how it happens. I suspect the cache may get invalidated/expired between the condition and the return statement.

from django-multisite.

oko-x avatar oko-x commented on August 25, 2024

Yes it is a race condition, when you run in loop Site.objects.get_current() and invalidate cache in between, it throws this

from django-multisite.

ziima avatar ziima commented on August 25, 2024

For us it occurs way too often (several times a day) and we don't invalidate cache manually. It is also too often for records to expire.

from django-multisite.

filwaitman avatar filwaitman commented on August 25, 2024

👍

Same issue here. Race-condition, in fact, seems to be the villain. I just optimized a project by creating a multiprocess setup and the amount of KeyErrors increased drastically.

Thanks for the good job (and for this fix) @rebkwok !

from django-multisite.

ziima avatar ziima commented on August 25, 2024

Will there be a new release with this bug fixed?

from django-multisite.

filwaitman avatar filwaitman commented on August 25, 2024

@ziima already done I guess (1.6.0 on PyPI)

from django-multisite.

ziima avatar ziima commented on August 25, 2024

Oh, I got confused by the fact, that tag is not on the bump commit. Thanks for clearing that up.

from django-multisite.

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.