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
2 answers

"Flask-SocketIO is Running under Werkzeug" despite using socketio.run()

I'm having trouble running Flask & SocketIO with Eventlet despite using socketio.run(), any suggestions are appreciated. I'm currently on Python 3.9 and I've tried multiple different versions of each of these modules with no avail. [2021-04-04…
Skel
  • 11
  • 1
0
votes
1 answer

Closing flask-socket io server programmatically

I am new to server development so please be kind... I am developing a test application that starts a flask-socketio server and after interacting with a clients, it needs to shutdown and open another instance. However this is not possible I get…
zambs
  • 21
  • 8
0
votes
2 answers

Can't Use PyQt5 and Eventlet Together

I want to create a SocketIO server in Python on Windows as a simulator for a SocketIO client I’m writing. The server uses eventlet to listen to local port 0.0.0.0. The simulator uses PyQt5 and has two buttons. One button emits one message from…
slalomchip
  • 779
  • 2
  • 9
  • 25
0
votes
1 answer

Parallel (proxy) request and take the fastest result

I'm trying to optimize requests through an external proxy (rotator). Sometimes the response is fast, sometimes very slow. So the idea is to send multiple requests in parallel of the same url request, take the fastest response, return the data, close…
Mickster
  • 189
  • 1
  • 6
0
votes
1 answer

flask_socket.io _ problem with running async tasks

I have this configuration on my flask project : in requrement.txt: flask_socketio eventlet in my app.py : from flask_socketio import SocketIO socketio = SocketIO(app, async_mode="eventlet") @socketio.on('register') async def register(data): …
Babak Abadkheir
  • 2,222
  • 1
  • 19
  • 46
0
votes
1 answer

Importing eventlet SSL results in: ModuleNotFoundError: No module named 'OpenSSL.tsafe'

Why am I getting the following import error when I try to import eventlet's SSL module: ModuleNotFoundError: No module named 'OpenSSL.tsafe' Is eventlet's OpenSSL not compatible with recent versions of pyOpenSSL? Reproduction Steps Using the…
firebush
  • 5,180
  • 4
  • 34
  • 45
0
votes
0 answers

dns.name.EmptyLabel: A DNS label is empty. when importing socketio or eventlet

Project GitHub repo: https://github.com/EdoardoCocconi/Udacity-Self-Driving-Car-Nanodegree/tree/master/Project%204%20-%20Behavioral%20Cloning I am working on a conda environment. Everything was working 1 month ago. I came back to make some changes…
0
votes
1 answer

Flask request.stream.read() is stopping when uploading file using SocketIO

I am running a Flask production server using flask-socketio and eventlet and when trying to submit a form which contains a file to upload, Flask fails to read the entire request. This occurs when the file reaches above a few kb (around 50kb or…
Meshi
  • 470
  • 4
  • 16
0
votes
1 answer

Maximum recursion depth exceeded on SSLContext (eventlet, flask, flask-socketio, tweepy)

I'm building a flask app that displays real-time data visualizations of tweets based on a user input. Right now, the client is still hosted locally and I'm just trying to get to the point where a json of a single tweet gets emitted from the server…
lemonlin
  • 96
  • 6
0
votes
0 answers

Handling signal: term (gunicorn, eventlet, Flask, Google App Engine)

I am running a Flask app on Google App Engine using Gunicorn's async workers. Every time requests come in, after the last request is finished responding, I get the following message and my gunicorn workers exit. Then, theres a slight delay when the…
Rishi Prasad
  • 69
  • 2
  • 9
0
votes
1 answer

Flask_SocketIO Not emitting custom events

I have a Flask_SocketIO app that supposed to implement a chat groups system. The client thats interacting with it is a flutter app. I wrote a test to see if the socketio events are working. it worked once, but than stopped. the server is getting…
DJ E.T
  • 31
  • 4
0
votes
2 answers

rabbitmq Pika connection getting disconnected frequently

I have the following code : import pika import os import eventlet from eventlet.green import threading pika = eventlet.import_patched('pika') eventlet.monkey_patch() #More Code if __name__=='__main__' eventlet.spawn(pika_client) …
Rupak Banerjee
  • 135
  • 1
  • 3
  • 11
0
votes
2 answers

How to handle "Redis.exceptions.ConnectionError: Connection has data"

I receive following output: Traceback (most recent call last): File "/home/ec2-user/env/lib64/python3.7/site-packages/redis/connection.py", line 1192, in get_connection raise ConnectionError('Connection has…
0
votes
1 answer

Flask-SocketIO app running on Gunicorn throws TypeError

I have a working Flask-SocketIO server but it is not working with Gunicorn. The relevant part of the server looks like this: def main(env, resp): app = Flask(__name__, static_url_path='', static_folder='dist', …
Nick
  • 396
  • 1
  • 3
  • 19
0
votes
2 answers

Flask SocketIO is executing single request at a time

My simple flask socketIO app, but at a time only single request is executing the method "write_message". I am using eventlet (https://eventlet.net/), which as per documentation can handle concurrent requests. socketio =…
DJSpar
  • 1
  • 1