Closed naveenbharadwaj19 closed 3 years ago
There is an example application in this repository that includes a web browser client. Have you tested that?
Also, you are asking about production, yet you are using Flask's development web server, which is a terrible choice to use in production. Use Gunicorn instead.
Why terrible ? host = 127.0.0.1,localhost
working if i change host to my ip4 address it's not connecting you have idea why ?
https://flask.palletsprojects.com/en/1.1.x/tutorial/deploy/#run-with-a-production-server
I'm going to stop responding to your messages until you provide the information I'm requesting. I'm not a magician, if I say that I need you to provide some details (i.e. logs) to help me understand your issue, asking the same question over and over while ignoring the request is not going to give you a solution.
Ok. Sry i'm new to websockets . I deployed the app on heroku exactly around 30 secs my websocket connection is getting disconnected this happens everytime
heroku log:
2021-05-09T10:37:06.216006+00:00 heroku[router]: at=info method=GET path="/test2" host=test-mongodb-server.herokuapp.com request_id=74d6b9df-77a0-45b3-aaeb-03bd27b2ee2a fwd="49.207.131.81" dyno=web.1 connect=3ms service=11427ms status=101 bytes=121 protocol=https
2021-05-09T10:37:10.469105+00:00 heroku[router]: at=info method=GET path="/test2" host=test-mongodb-server.herokuapp.com request_id=2a0efca8-fd8d-45ad-b36a-8b2bb834c84a fwd="49.207.131.81" dyno=web.1 connect=0ms service=3664ms status=101 bytes=114 protocol=https
2021-05-09T10:37:25.078342+00:00 app[web.1]: [2021-05-09 10:37:25 +0000] [4] [CRITICAL] WORKER TIMEOUT (pid:7)
2021-05-09T10:37:25.079112+00:00 app[web.1]: [2021-05-09 10:37:25 +0000] [7] [INFO] Worker exiting (pid: 7)
2021-05-09T10:37:25.553694+00:00 app[web.1]: [2021-05-09 10:37:25 +0000] [25] [INFO] Booting worker with pid: 25
2021-05-09T10:37:37.624566+00:00 app[web.1]: [2021-05-09 10:37:37 +0000] [4] [CRITICAL] WORKER TIMEOUT (pid:8)
2021-05-09T10:37:37.625179+00:00 app[web.1]: [2021-05-09 10:37:37 +0000] [8] [INFO] Worker exiting (pid: 8)
2021-05-09T10:37:38.110582+00:00 app[web.1]: [2021-05-09 10:37:38 +0000] [33] [INFO] Booting worker with pid: 33
websocket link: wss://test-mongodb-server.herokuapp.com/test2
I suggest you read the documentation of the platforms that you are using. https://devcenter.heroku.com/articles/websockets#timeouts
This package is so easy and good . But i'm facing a problem i could not use the websocket url other than wscat. With wscat command it works fine
code :
Steps tried:
server output log :
<hostname> - - [08/May/2021 19:26:54] "▬♥☺☻ ☺ ☺ü♥♥↔¯ï°nså▲æLQ"ærqçÜþ♫ÜäUÌ☺Чr^ ◄" HTTPStatus.BAD_REQUEST -