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
0
votes
0 answers

When connecting with flask-socketio get an error when loading html source files

I am using socket.io js (client) and connecting to flask-socketio (server). The connection occurs, but I get an error in python when loading source files in my HTML. So it tried to first load the source files and then make the socket connection: …
Dave
  • 147
  • 1
  • 8
0
votes
1 answer

Flask app streaming multiple logs to multiple clients

I have written a small Flask app to stream multiple log files to a browser over the internet. import json import os import re import flask from shelljob import proc import eventlet eventlet.sleep() eventlet.monkey_patch() app =…
Rojj
  • 1,170
  • 1
  • 12
  • 32
0
votes
1 answer

download files with eventlet

I want to use threads to download many files at once. Here's what I've tried: import eventlet from urllib.request import urlopen def fetch(url, fl): urllib.request.urlretrieve(url, fl) return url, fl pool = eventlet.GreenPool() for url, fl…
Rafael
  • 3,096
  • 1
  • 23
  • 61
0
votes
1 answer

Eventlet is_monkey_patched issues False

Hello I have a django app. My whole system configuration is the following: python 3, django 1.11, eventlet 0.21.0. 1) Nginx as an upstream server: upstream proj_server { server unix:///tmp/proj1.sock fail_timeout=0; server…
Roman Storozhenko
  • 369
  • 1
  • 3
  • 16
0
votes
1 answer

Eventlet assert exception on queue.put

I'm getting weird exception from time to time when trying to put in eventlet/queue some item. for message in kafka_consumer: queue_in.put(message.value) packages/eventlet/queue.py", line 265, in put assert result is waiter, "Invalid switch…
Alon Rolnik
  • 803
  • 1
  • 7
  • 12
0
votes
1 answer

greenthreads doesn't run just after the spawn call

I'm creating a simple program that uses the eventlet greenthreads and I cannot understand their behavior. From the following example it seems to me that the thread only runs when I call the .wait() method. I read the documentation and I can't find…
rkachach
  • 16,517
  • 6
  • 42
  • 66
0
votes
0 answers

Scapy with eventlet raises "Child died unexpectedly. Packets may have not been sent"

I've been doing some work on port scanning. I'm trying to do a SYN scan (send SYN and and cut the cord if I get an SYN-ACK), and the operation worked perfect on single thread. When trying to run it using eventlet (on a Celery threaded worker), I get…
Den1al
  • 617
  • 1
  • 10
  • 16
0
votes
0 answers

Flask-SocketIO + Nginx: 502 connecting refused

This error appears only when i connect from android application using mobile internet, but via wifi all works. nginx error.log: connect() failed (111: Connection refused) while connecting to upstream, client: 79.143.100.252, server: 0.0.0.0,…
0
votes
1 answer

ETIMEDOUT occurs when client(jmeter) fired more than 1000 parallel HTTP requests

I have a python application that uses eventlet Green thread (pool of 1000 green threads) to make HTTP connections. Whenever the client fired more than 1000 parallel requests ETIMEDOUT occurs. Can anyone help me out with the possible reason?
Avv
  • 555
  • 1
  • 10
  • 18
0
votes
1 answer

Eventlet wsgi server and time-consuming operations in requests

Let's assume we have a WSGI app which is hosted on an event-driven single-threaded server: from eventlet import wsgi import eventlet def app(env, start_response): # IO opeartions here ... wsgi.server(eventlet.listen(('', 8090)),…
olegst
  • 1,209
  • 1
  • 13
  • 33
0
votes
2 answers

Starting celery with a project's name as a command line parameter issued an error

I have a project under dev VM 'ubuntu/trusty'. I use virtualenv with the following packages: celery 3.1.23 eventlet 0.18.4 django 1.8.15 Python version is 3.4.3. When I start a celery worker in this way: celery worker --loglevel=INFO -P eventlet…
Roman Storozhenko
  • 369
  • 1
  • 3
  • 16
0
votes
0 answers

Pyudev's ObserverMonitor locks up GIL when monkey patched

Whenever I use eventlet's monkey patching (necessary for Flask-SocketIO) the disk_monitor_thread() prevents other threads from firing. Eventlet and monkey patching is a must for me. Is there a way to get pyudev's MonitorObserver to place nice and…
Kenny Powers
  • 1,254
  • 2
  • 15
  • 25
0
votes
1 answer

Celery worker errors using eventlet on Solaris

I'm running a standard celery worker using the eventlet class and concurrency set to 8. These are pretty busy workers when this is happening (but may happen when not busy, it's hard to tell). I know I don't have any leaks in my task, and have run…
woot
  • 7,406
  • 2
  • 36
  • 55
0
votes
0 answers

How to send HTTP requests as quickly as possible in Python 2.7

I need to implement a script to send HTTP requests as quickly as possible. I have tried eventlet + requests. The code as following shown, note that I have set the timeout value to 1 second. import eventlet eventlet.monkey_patch(all=False,…
Jacky1205
  • 3,273
  • 3
  • 22
  • 44
0
votes
0 answers

Django and concurrent tasks in Celery

I have a complicated scenario I need to tackle. I'm using Celery to run tasks in parallel, my tasks involve with HTTP requests and I'm planning to use Celery along with eventlet for such purpose. Let me explain my scenario: I have 2 tasks that can…
DjangoPy
  • 855
  • 1
  • 13
  • 29
1 2 3
20
21