Git Product home page Git Product logo

Comments (8)

notanumber avatar notanumber commented on June 24, 2024

This isn't as serious of an issue as I initially thought. This will only happen when WSGIDaemonProcess is set to use more than one process.

Until this can be fixed, it's better to leave the default of no multiprocessing. See here for more information: http://code.google.com/p/modwsgi/wiki/ProcessesAndThreading

from xapian-haystack.

notanumber avatar notanumber commented on June 24, 2024

Not sure this is really an issue that should be tackled at the backend level seeing as Haystack now supports QueueSearchIndex that would alleviate the need for this.

http://haystacksearch.org/docs/best_practices.html#use-of-a-queue-for-a-better-user-experience

Perhaps a note detailing how to implement a Xapian specific queue would be adequate.

from xapian-haystack.

notanumber avatar notanumber commented on June 24, 2024

Updated README with details on how to avoid this situation.

Either set WSGIDaemonProcess processes=1 or override the default SearchIndex class to remove the post-save and post-delete signals on model changes.

from xapian-haystack.

eaigner avatar eaigner commented on June 24, 2024

WSGIDaemonProcess processes=1 doesn't seem to work (at least for me). Still got the lock error on my server. On the local dev server it works just fine.

from xapian-haystack.

notanumber avatar notanumber commented on June 24, 2024

Hmm. Can you confirm that there is only one wsgi process running by looking at ps or top? Besides that I'd suggest removing the contents of the index folder and reindexing to see if it happens again. Is it possible that you restarted the server while it was writing the indexes (maybe a model updated triggered an re-index)?

To be honest, you're not the first person to report this happening to them. My suggestion would be to go the cronjob indexing route and to remove the signals causing the automatic reindexing. I've opened a defect in the Haystack queue and attached a patch that would make this easier to do, but for now, you can use this gist http://gist.github.com/214254 to get an idea of how to do it, should you decide to go this route.

from xapian-haystack.

notanumber avatar notanumber commented on June 24, 2024

The Haystack ticket I referred to is here: http://github.com/toastdriven/django-haystack/issues#issue/121. Feel free to comment on this one as well with your thoughts.

from xapian-haystack.

eaigner avatar eaigner commented on June 24, 2024

Yep i made a ps and only one wsgi process is there. I think I'll go with the queue framework for now http://code.google.com/p/queues/ and setup a separate QueueSearchIndex.

from xapian-haystack.

notanumber avatar notanumber commented on June 24, 2024

I'd very interested in hearing how that works out. I haven't had the chance to try it myself.

from xapian-haystack.

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.