Replies: 3 comments 16 replies
-
Try this:
Try the application after making these changes and let me know if you see any difference. |
Beta Was this translation helpful? Give feedback.
-
hai @miguelgrinberg |
Beta Was this translation helpful? Give feedback.
-
First of all, I want to thank you so much for your efforts and for your concise response. Here is my code,
It only has two events in it.
2. cancel_query: This is my another event that will call while gpt_query event emitting data to user. This event will cancel run of gpt response and emit @//done//@ to user after canceling response. But this is not emitting @//done//@ to user after canceling instead storing some data in its buffer. To resolve this condition I have to use await sio.sleep(1). this is clearing the buffer and emit @//done//@ to user.
I am running this code using
I know some of my question being silly. I am deploy my app for the first time and I am bit confused. Thanks again :) |
Beta Was this translation helpful? Give feedback.
-
Hello There,
I am stuck in a condition where I am figuring out what the problem is. Please help me.
I wrote flask socket io code to handle three events. This code works perfectly on my local computer when I am connecting with my localhost client. But when I push that code on AWS EC2 server, it gives me error.
ERROR - server=chatbot.com//socket.io/ client=10.4.1.4:21688 socket shutdown error: [Errno 9] Bad file descriptorserver=chatbot.com//socket.io/ client=10.4.1.5:32876 socket shutdown error: [Errno 9] Bad file descriptorI
After that error server is not behaving the same. It is making multiple connection and then disconnect every 10 seconds.
Evenlet monkey patch also not working on AWS EC2 server.
Dependencies
python 3.10
Flask-SocketIO 5.3.6
requests==2.31.0
flask-cors==4.0.0
eventlet== 0.36.1
gevent=24.2.1
gevent-websocket 0.10.1
my code is
server screen shot
![image](https://private-user-images.githubusercontent.com/113279035/337876327-b0e45408-ced2-4223-a18f-d9a1666754d3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjc2OTUsIm5iZiI6MTczOTE2NzM5NSwicGF0aCI6Ii8xMTMyNzkwMzUvMzM3ODc2MzI3LWIwZTQ1NDA4LWNlZDItNDIyMy1hMThmLWQ5YTE2NjY3NTRkMy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQwNjAzMTVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hOTY2YWU1ZGY5NzQ2MDE5NzRhZDUyMTBhYjBkODhhZDk2OWU0OGYwNzY2ODk2Y2MyNDIyZTkyYzg1ZmUzY2Y3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.MI9eBFvOx1rHupejalVFgAaHR8yxEghBSarfSMZjjwc)
I know its little complex but please help me
@lucaswiman @dbrnz @spezifanta @miguelgrinberg please look into this
Beta Was this translation helpful? Give feedback.
All reactions