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
244
votes
19 answers

error: command 'gcc' failed with exit status 1 while installing eventlet

I wanted to install eventlet on my system in order to have "Herd" for software deployment.. but the terminal is showing a gcc error: root@agrover-OptiPlex-780:~# easy_install -U eventlet Searching for eventlet Reading…
Anubhav Grover
  • 2,451
  • 2
  • 14
  • 6
36
votes
4 answers

Eventlet or gevent or Stackless + Twisted, Pylons, Django and SQL Alchemy

We're using Twisted extensively for apps requiring a great deal of asynchronous io. There are some cases where stuff is cpu bound instead and for that we spawn a pool of processes to do the work and have a system for managing these across multiple…
Khorkrak
  • 3,911
  • 2
  • 27
  • 37
32
votes
2 answers

Fastest way to download 3 million objects from a S3 bucket

I've tried using Python + boto + multiprocessing, S3cmd and J3tset but struggling with all of them. Any suggestions, perhaps a ready-made script you've been using or another way I don't know of? EDIT: eventlet+boto is a worthwhile solution as…
Jagtesh Chadha
  • 2,632
  • 2
  • 23
  • 30
31
votes
3 answers

Gunicorn ImportError: cannot import name 'ALREADY_HANDLED' from 'eventlet.wsgi' in docker

I had a working code running flask with gunicorn (eventlet worker) in docker. It's also working in production, but on my machine, it started doing this. I can't find anything on google about this thing. What meight be the problem? Error: class uri…
Mark7888
  • 823
  • 1
  • 8
  • 20
30
votes
1 answer

Eventlet vs Greenlet vs gevent?

I'm trying to create a GUI framework that will have an event-loop. some threads to handle the UI and some for event handling. I've searched a little bit and found these three libraries and I'm wondering which one is better to use? what are the pros…
mehdy
  • 3,174
  • 4
  • 23
  • 44
20
votes
10 answers

How to efficiently do many tasks a "little later" in Python?

I have a process, that needs to perform a bunch of actions "later" (after 10-60 seconds usually). The problem is that those "later" actions can be a lot (1000s), so using a Thread per task is not viable. I know for the existence of tools like gevent…
Emil Ivanov
  • 37,300
  • 12
  • 75
  • 90
20
votes
2 answers

What does make significant difference of performance between eventlet and gevent?

Those two libraries share the similar philosophy and the similar design decisions as a result. But this popular WSGI benchmark says eventlet is way slower than gevent. What do make their performance so different? As I know key differences between…
minhee
  • 5,688
  • 5
  • 43
  • 81
17
votes
2 answers

Flask application scaling on Kubernetes and Gunicorn

We have a Flask application that is served via gunicorn, using the eventlet worker. We're deploying the application in a kubernetes pod, with the idea of scaling the number of pods depending on workload. The recommended settings for the number of…
CadentOrange
  • 3,263
  • 1
  • 34
  • 52
14
votes
1 answer

What are the benefits of using the Eventlet module in python over the threading module?

Specifically the GreenPool class in Eventlet. I have tested some code to upload large files to S3 as individual pieces of a multipart upload. What I have noticed so far is that when using eventlet the CPU usage is much lower. Just looking for other…
rking788
  • 431
  • 1
  • 5
  • 12
13
votes
2 answers

Responding to concurrent requests with Flask and eventlet

I try to set up a minimal Flask application that uses eventlet to respond to concurrent requests instantly instead of blocking and responding to one request after the other (as the standard Flask debugging webserver does). Prerequisites: pip install…
Dirk
  • 9,381
  • 17
  • 70
  • 98
11
votes
6 answers

What happens when a single request takes a long time with these non-blocking I/O servers?

With Node.js, or eventlet or any other non-blocking server, what happens when a given request takes long, does it then block all other requests? Example, a request comes in, and takes 200ms to compute, this will block other requests since e.g.…
codecompleting
  • 9,251
  • 13
  • 61
  • 102
11
votes
2 answers

Celery + Eventlet + non blocking requests

I am using Python requests in celery workers to make large number of (~10/sec) API calls(includes GET,POST, PUT, DELETE). Each request takes around 5-10s to complete. I tried running celery workers in eventlet pool, with 1000 concurrency. Since…
Maddy
  • 791
  • 1
  • 8
  • 22
10
votes
1 answer

Obtaining Client IP address from a WSGI app using Eventlet

I'm currently writing a basic dispatch model server based on the Python Eventlet library (http://eventlet.net/doc/). Having looked at the WSGI docs on Eventlet (http://eventlet.net/doc/modules/wsgi.html), I can see that the eventlet.wsgi.server…
10
votes
2 answers

Eventlet + DNS Python Attribute Error: module "dns.rdtypes" has no attribute ANY

I know that someone will face this problem. I had this problem today, but I could fix it promptly, and I want to share my solution: Problem: from flask_socketio import SocketIO You will receive an output error with something like: Attribute Error:…
10
votes
1 answer

Django exceeds maximum Postgres connections

I am experiencing a problem with a Django application that is exceeding the maximum number of simultaneous connections (100) to Postgres when running through Gunicorn with async eventlet workers. When the connection limit it reached the application…
Hans Kristian
  • 1,786
  • 19
  • 25
1
2 3
20 21