-
-
Notifications
You must be signed in to change notification settings - Fork 895
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
sometimes, it takes really very long time to connect on heroku #171
Comments
I assume you added eventlet to the requirements file you uploaded to Heroku? Please add the server-side log. |
Yes, I deployed to heroku again and also put the same source code to github. New heroku url:http://flasksocketiofork.herokuapp.com/ New github source code forkhttps://github.com/small-yellow-rice/Flask-SocketIO/tree/master/example server side log2015-11-18T14:48:38.294288+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/socket.io/?EIO=3&transport=polling&t=1447858079081-120&sid=47fdb2e6454043b8837e5372fa3817f5" host=flasksocketiofork.herokuapp.com request_id=2c65aba4-3a77-4f91-89ca-07cc3d940280 fwd="75.110.42.166" dyno=web.1 connect=3ms service=30001ms status=503 bytes=0 New app output:Received #0: Connected The following is my deployment log from heroku:remote: Successfully installed Flask-0.10.1 Flask-SocketIO-1.0 Jinja2-2.7.3 MarkupSafe-0.23 W |
Thanks. I can reproduce the problem here too. I'm investigating. |
Can I ask you to perform a simple test? Please change the gunicorn release from 19.3 to 18.0. Let me know if that makes it work for you. With that change I'm getting the example to run on Heroku. The odd thing is that gunicorn 19.3 works fine locally. |
Work like amazing after switching gunicorn to 18.0!! |
Awesome! Leave it open for now, I need to figure out if this is a gunicorn problem or something I can address on my side. |
OK. Flask-SocketIO have everything I need for my personal website. |
Filed a bug with Gunicorn. |
After I deploy example in Flask-SocketIO to heroku(http://flasksocketio2.herokuapp.com/)
https://github.com/miguelgrinberg/Flask-SocketIO/tree/master/example
my Procfile
web: gunicorn --worker-class eventlet app:app
It usually takes sevral tries to connect.
It seems that after several times retrying, It can connect.
But sometimes it will take really very long time.
The output will be like this:
Received #0: Connected
Received #0: Connected
Received #0: Connected
Received #0: Connected
Received #0: Connected
Received #1: I'm connected!
Received #96: Server generated event
Received #97: Server generated event
Received #98: Server generated event
Received #99: Server generated event
Received #100: Server generated event
Received #101: Server generated event
Received #102: Server generated event
Received #103: Server generated event
Also the following errors happen every time.
Should I ignore the error?
The second error is just fine,
but the first error sometimes happened too many times. I have to wait long time to be connect.
error1
Firefox can't establish a connection to the server at ws://flasksocketio2.herokuapp.com/socket.io/?EIO=3&transport=websocket&sid=92cd00f57ded4da9863a9bb2178b5b4d.
error2
The connection to ws://flasksocketio2.herokuapp.com/socket.io/?EIO=3&transport=websocket&sid=e68d81ce5f9c4659aee891fbbb2ccf08 was interrupted while the page was loading.
The text was updated successfully, but these errors were encountered: