Note that there are some explanatory texts on larger screens.

plurals
  1. POgetaddrinfo() seems to block when using eventlet
    primarykey
    data
    text
    <p>I run my Django-celery tasks using eventlet. But something is still blocking. I used eventlet's blocking detection and found out that getaddrinfo() is blocking. I read somewhere that I have to install the "dnspython" package, but it makes no difference with or without. It is installed at the moment:</p> <pre><code>dnspython - A DNS toolkit for Python INSTALLED: 1.11.0 (latest) </code></pre> <p>It is also funny that the blocking appears somewhere inside eventlet's code (eventlet.green.socket).</p> <p>I run celery like that:</p> <pre><code>/var/www/myproject/async_manage.py celeryd -B \ --schedule=/var/www/myproject/celerybeat-schedule \ --loglevel=INFO -P eventlet -c 1000 \ --settings=myproject.settings.myproject_deployment </code></pre> <p>My custom async_manage.py (parts of it):</p> <pre><code>import pymysql pymysql.install_as_MySQLdb() import eventlet import eventlet.debug os.environ["EVENTLET_NOPATCH"] = 'True' eventlet.monkey_patch() eventlet.debug.hub_prevent_multiple_readers(False) eventlet.debug.hub_blocking_detection(True, 0.1) if __name__ == "__main__": from django.core.management import execute_from_command_line execute_from_command_line(sys.argv) </code></pre> <p>This is the error I get:</p> <pre><code>Task myproject.apps.myapp.tasks.mytask with id f8794028-699e-43ba-b48f-3d81b7614f1f raised exception: 'RuntimeError("Blocking detector ALARMED atTraceback(filename=\'/var/www/virtualenvs/myproject/local/lib/python2.7/site-packages/eventlet/green/socket.py\', lineno=43, function=\'create_connection\', code_context=[\' for res in getaddrinfo(host, port, 0, SOCK_STREAM):\\\\n\'], index=0)",)' </code></pre> <p>Do you have any clue how to fix that? This makes no sense to me.</p> <p>Thanks in advance, Matthias</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload