-
-
Notifications
You must be signed in to change notification settings - Fork 887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid session (even with sticky sessions) #467
Comments
FWIW there's another exception that can randomly occur instead of the previous KeyError, but it's always one of the two:
|
Hi @bui Firstly, you have Secondly, I am not exactly sure of how nginx should be configured. But I have the directive |
1 uWSGI worker per process is correct, since the app needs to be available on multiple ports in order to use nginx load balancing. I believe this is what @miguelgrinberg recommends in this scenario.
|
I keep getting these two exceptions and I am running on flask-socketio development server ( Any progress guys? |
@Kisslick can you post the output of pip freeze? Have you been able to reduce your app to something minimal and still get this error, and can you post details of your app, preferably with the code? |
@Kisslick @bui Are your clients connecting over WebSocket, or do they stay on long polling? If you are using a browser app as the client, you can look in the Network section of the browser's debugger. If you see a constant stream of requests, then the client is doing long polling. For WebSocket, there will be one WebSocket request in the list, and no new requests issued. Also, do you get the same errors if you use the example application in this repository instead of your own? Do you get the error if you deploy a single worker instead of 8? |
I"m going to assume this was caused by the disconnection bug in python-engineio I recently fixed. Try upgrading to python-engineio==1.6.0 and reopen the issue if you continue to experience problems. |
My setup: Flask -> uWSGI + gevent (8 separate processes running via supervisord) -> nginx
RabbitMQ as a message queue
nginx config:
Example uWSGI run command:
Flask-SocketIO initialisation:
(I have also applied gevent monkey patching at the start of the app)
This is the error that occurs on connection:
I've spent hours trying to figure out what's wrong, but I'm completely stumped now. Any ideas on what might be the issue here?
The text was updated successfully, but these errors were encountered: