Questions tagged [eventlet]

a concurrent networking library for Python that provides performance and scalability of non-blocking IO while writing simple blocking code (no callbacks) using green threads.

It uses epoll or kqueue or libevent for highly scalable non-blocking I/O. Coroutines ensure that the developer uses a blocking style of programming that is similar to threading, but provide the benefits of non-blocking I/O. The event dispatch is implicit, which means you can easily use Eventlet from the Python interpreter, or as a small part of a larger application. It's easy to get started using Eventlet, and easy to convert existing applications to use it. Start off by looking at examples, common design patterns, and the list of the basic API primitives.

License: MIT.

http://eventlet.net/

311 questions
3
votes
1 answer

gevent breaks requests/urllib2 timeouts

Some time ago I wrote code that interacts with foreign service for my Django project: try: response = requests.get('some host', timeout=TIMEOUT) except: log.warning('timeout') return None I tested it in my devel…
Artem Mezhenin
  • 5,539
  • 6
  • 32
  • 51
3
votes
3 answers

`eventlet.spawn` doesn't work as expected

I'm writing a web UI for data analysis tasks. Here's the way it's supposed to work: After a user specifies parameters like dataset and learning rate, I create a new task record, then a executor for this task is started asyncly (The executor may take…
satoru
  • 31,822
  • 31
  • 91
  • 141
3
votes
1 answer

How can I raise exception in main thread when using eventlet.GreenPool.spawn

I run some task using eventlet.GreenPool.spawn, then wait for all greanthreads to finish. I know there would be an exception raised - how can I catch that exception and throw it in a main thread? I am pretty sure it's easy however I'm totally…
lukaszb
  • 694
  • 1
  • 6
  • 15
2
votes
1 answer

How to make non-blocking raw_input when using eventlet.monkey_patch() and why it block everything, even when executed on another thread?

I wrote this minimum code to explain my case: import threading import time import eventlet eventlet.monkey_patch() def printing_function(): while True: # here i want to do some work print "printing" time.sleep(1) if…
SuitUp
  • 3,112
  • 5
  • 28
  • 41
2
votes
1 answer

Unterstanding eventlet.wsgi.server

I have this simple Python programm: from eventlet import wsgi import eventlet from eventlet.green import time def hello_world(env, start_response): print "got request" time.sleep(10) start_response('200 OK', [('Content-Type',…
ihucos
  • 1,821
  • 3
  • 19
  • 30
2
votes
1 answer

python greenlet segmentation fault

I use ubuntu 11.10 with Python 2.7.2 I try to use eventlet or Concurrence, but simple examples fails with "segmentation fault" I read this is a greenlet problem, but don't know how to fix this? plese help.
evg
  • 497
  • 1
  • 5
  • 14
2
votes
0 answers

Celery with eventlet or gevent doesn't work properly

I'm running Celery using code, like this: if __name__ == '__main__': worker = celery.Worker() worker.setup_defaults( loglevel=logging.INFO, pool='eventlet', concurrency=500 ) worker.start() When running…
Cyril N.
  • 38,875
  • 36
  • 142
  • 243
2
votes
2 answers

Would puka work well with gevent or eventlet?

I was reading about the newer Python AMQP library Puka (not to be confused with Pika) and was wondering if the way it handles it's event loop would be compatible with gevent or eventlet. Based on my limited knowledge, it seems like you could…
Chris Sears
  • 6,502
  • 5
  • 32
  • 35
2
votes
1 answer

wsgi error: Address already in use - socketio/django/apache2

My project is created with React (create-react-app), React router (no webpack), -- Django (rest) and Socketio with eventlet on the backend. I have 3 problems with deployment with apache2 - Everything worked perfectly on development: Created 2 conf…
The S.
  • 126
  • 1
  • 8
2
votes
0 answers

Python Bigquery to_dataframe function is blocked when gunicorn is run with worker class gevent

When I run my flask app with worker-class=gevent on gunicorn, the server blocks. gunicorn command gunicorn app:app --workers=5 --worker-class=gevent --threads=5 --timeout=1800 --log-level=DEBUG Source code query = '...' query_job =…
gsroot
  • 21
  • 1
2
votes
2 answers

Eventlet and Python daemon, Foo not called?

I am trying to build a Python deamon which listen to a queue (Redis Kombu). Grab the task and spawn a greenthread to process this task. I can receive the task and consume it without trouble but when I try to spawn a GreenThread with eventlet it does…
coulix
  • 3,328
  • 6
  • 55
  • 81
2
votes
0 answers

Signal Handler for Flask application with Gunicorn + Eventlet

Currently, I am trying to add a signal handler that correctly updates the database state whenever our server is re-started/updated by listening for SIGTERM interrupts. Our Flask app is on a Gunicorn server monkey-patched with eventlet. However,…
John Targaryen
  • 1,109
  • 1
  • 13
  • 29
2
votes
1 answer

ERROR:grpc._plugin_wrapping:AuthMetadataPluginCallback raised exception! (gunicorn) when using eventlet (async) workers

I've written a Flask app that runs perfectly fine - exactly as I want it to, when using Flask's development server via flask run. It's a long web-scraping process using a lot of Google Cloud libraries. After deploying to Google App Engine, I figured…
notacorn
  • 3,526
  • 4
  • 30
  • 60
2
votes
1 answer

Eventlet breaks select.poll

Eventlet monkey patch seems breaking py3 select.poll() on my ENV (i try to install openstack ironic), But openstack group could not reproduce this issue, anyone knows why? I can simply reproduce it by: Python 3.6.9 (default, Nov 7 2019, 10:44:02)…
NewBee
  • 1,331
  • 12
  • 13
2
votes
1 answer

Processing of tasks in celery workers are getting delayed

With celery, I have created listeners to Redis for getting all write events to Redis. Based on the events, I will trigger celery tasks to migrate data from Redis to DB. I'm using the eventlet pool along with concurrency of 1000. Also, I'm having 5…
Srinithi
  • 21
  • 2