I have a flask-socketio app hosted on heroku with the following Procfile :
web: gunicorn --worker-class eventlet hello:app
Ever since I switched to socketio, the app has been behaving inconsistenly. Earlier the app would run for a while and then POST requests would start timing out.
Since yesterday night, I keep getting the error
sock=backend at=error code=H18 desc="Server Request Interrupted" method=GET path="/static/js/third-party/browser.js" host=deard.herokuapp.com request_id=725da6af-aa29-4293-a411-2c89977f1d4d fwd="216.165.95.0" dyno=web.1 connect=1ms service=36ms status=503 bytes=13811
I read the heroku error code description which says "The backend socket, belonging to your app’s web process was closed before the backend returned an HTTP response."
But I have no clue why this would be happening.
Any clue as to what I should be looking out for, will help me debug this.
I could share the code but its 300 lines long and since I don't know where the error is originating from, I am not sure if it would be helpful.
--worker-class socketio.sgunicorn.GeventSocketIOWorker
. I am following this here. – AlbarranGeventSocketIOWorker
class is used when you use gevent-socketio. But Flask-SocketIO does not use that package. – Mortarlogger=True, engineio_logger=True
to yourSocketIO
constructor. – Mortar