Re: This operation would block forever
Etienne Robillard <[email protected]> Fri, 24 Nov 2017 06:52:36 -0500
| Newsgroups | gmane.comp.web.zope.zodb |
|---|---|
| Message-ID | <[email protected]> |
I found the solution here:
http://uwsgi-docs.readthedocs.io/en/latest/Gevent.html
Regards,
Etienne
Le 2017-11-22 à 12:19, Etienne Robillard a écrit :
> Hi,
>
> My custom Schevo/ZODB backend uses gevent internally to make
> asynchronous ZODB operations.
>
> Sometimes I get a internal 500 error/traceback:
>
> Traceback (most recent call last):
> File "lib/notmm/controllers/wsgi.pyx", line 209, in
> notmm.controllers.wsgi.BaseController.get_response
> (lib/notmm/controllers/wsgi.c:4328)
> File
> "/home/erob/src/django-hotsauce/lib/notmm/dbapi/orm/decorators.py",
> line 35, in _wrapper
> return view_func(req, **kwargs)
> File "/home/erob/src/blogengine2/lib/blogengine2/views/detail.py",
> line 43, in details
> result = db.Message.findone(messageid=oid)
> File
> "/home/erob/src/django-hotsauce/extras/libschevo/lib/schevo/extent.py",
> line 174, in findone
> results = self._find(self.name, criterion)
> File
> "/home/erob/src/django-hotsauce/extras/libschevo/lib/schevo/database2.py",
> line 768, in _find_entity_oids
> extent_name, criteria)
> File
> "/home/erob/src/django-hotsauce/extras/libschevo/lib/schevo/database2.py",
> line 895, in _find_entity_oids_field_equality
> results = list(branch.keys())
> File "/home/erob/ncvs/ZODB/src/ZODB/Connection.py", line 783, in
> setstate
> p, serial = self._storage.load(oid)
> File "/home/erob/ncvs/ZODB/src/ZODB/mvccadapter.py", line 144, in load
> r = self._storage.loadBefore(oid, self._start)
> File "/home/erob/work/ZEO-5.1.0/src/ZEO/ClientStorage.py", line 522,
> in loadBefore
> return self._server.load_before(oid, tid)
> File "/home/erob/work/ZEO-5.1.0/src/ZEO/asyncio/client.py", line
> 783, in load_before
> return self.__call(self.client.load_before_threadsafe, oid, tid)
> File "/home/erob/work/ZEO-5.1.0/src/ZEO/asyncio/client.py", line
> 743, in call
> return self.wait_for_result(result, timeout)
> File "/home/erob/work/ZEO-5.1.0/src/ZEO/asyncio/client.py", line
> 756, in wait_for_result
> return future.result(timeout)
> File
> "/usr/local/lib/python2.7/dist-packages/futures-3.0.5-py2.7.egg/concurrent/futures/_base.py",
> line 400, in result
> self._condition.wait(timeout)
> File "/usr/lib/python2.7/threading.py", line 340, in wait
> waiter.acquire()
> File "src/gevent/_semaphore.py", line 198, in
> gevent._semaphore.Semaphore.acquire (src/gevent/gevent._semaphore.c:4541)
> File "src/gevent/_semaphore.py", line 226, in
> gevent._semaphore.Semaphore.acquire (src/gevent/gevent._semaphore.c:4367)
> File "src/gevent/_semaphore.py", line 166, in
> gevent._semaphore.Semaphore._do_wait
> (src/gevent/gevent._semaphore.c:3562)
> File "/usr/local/lib/python2.7/dist-packages/gevent/hub.py", line
> 630, in switch
> return RawGreenlet.switch(self)
> LoopExit: ('This operation would block forever', <Hub at 0xb370b93c
> epoll pending=0 ref=0 fileno=12
> resolver=<gevent.resolver_thread.Resolver at 0xb370e32c
> pool=<ThreadPool at 0xb370e30c 0/1/10>> threadpool=<ThreadPool at
> 0xb370e30c 0/1/10>>)
>
> Any ideas what could be the cause of this blocking error when using
> epoll and gevent to make ZODB operations under uWSGI and python 2.7?
>
> Regards,
>
> Etienne
>
--
Etienne Robillard
[email protected]
http://www.isotopesoftware.ca/
--
You received this message because you are subscribed to the Google Groups "zodb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.