- #Livereload status 101 switching protocols windows 10#
- #Livereload status 101 switching protocols free#
So for example, if you configure 20 web threads you will be able to handle about 10 connected clients. The approximate number of concurrent clients you will be able to support is half the number of threads that you run. You will not have WebSocket if you do this. If you run a single Gunicorn process and enable lots of threads on it, and do not use eventlet/gevent, then Flask-SocketIO should work (though I haven't personally tested nor documented this option).
Normally Gunicorn and uWSGI are not used with threads.This server, however, works really well with Flask-SocketIO, as you also have experienced. The Flask dev server is, as you already know, not recommended for a production site.Once again, I apologize this is so complex and confusing. Works on my local machine but not on the server. I'm reading the last line of this text file once every second to get the current encoding progress and show it on my website. So whenever a file is being converted, the previous 1.txt file gets overwritten with the encoding progress of whatever file is being converted. I've told FFmpeg to write the encoding progress to a file called 1.txt every time (you can see this in converter.py).
#Livereload status 101 switching protocols free#
Please have a look when you're free and if you have any questions or would me to show you something in particular, let me know :)Įdit: For more info on how this works, I'm using FFmpeg to encode files and it has an option to write the encoding progress to a text file. I've recorded a video for you to show what is supposed to happen. I've also noticed that the "?EIO" websocket thing repeatedly shows up in the network log, whereas on my website running on the Ubuntu server with Nginx/Gunicorn, there's is only two "?EIO" socket things followed by one with a status of 101 and "Pending" in the "Time" column.
#Livereload status 101 switching protocols windows 10#
When running the flask app locally on my Windows 10 machine using the flask development server, the realtime conversion progress shows as it should. Maybe the 101 thing is not the issue, this is my first time using websockets and Flask-SocketIO so I just mentioned the 101 thing being stuck on pending as I was assuming that was the issue, but the issue might be something else. When this button appears, underneath it it is supposed to be showing the conversion progress in realtime. When it has uploaded, it starts converting and an unclickable button (File uploaded. When the user selects an audio file and clicks on the convert button at the bottom, the file starts uploading. So I fail to see the problem with this connection. Looking at that websocket connection on your site I see that ping and pong packets are being sent at the 25 second rate as normal. I'm confused about what you expect to happen with that 101. To configure gunicorn, I created a rvice file as suggested in this tutorial. I'm also using eventlet as you can see in the rvice file below. This works when running this on my local computer, so I'm guessing the issue is related to Nginx or Gunicorn. Converting." stage, you are supposed to be able to see the converting progress at the bottom of my webpage. Simply go to my website using Chrome, right click on the webpage, select "Inspect", click on the "Network" tab and you will see what I mean.Īfter selecting an audio file and clicking on "Convert", during the "File uploaded. You can access my website via if it will help you to diagnose the issue. my website) that is running on the ubuntu server. Here is what I see in the network tab when I access the same flask app (i.e. Here is what I see in the network tab when running it on my local computer (and everything works as it should): Converting." stage This works when running my flask app on my local computer, however I also run my flask app on an Amazon AWS ubuntu server (because I want my website to be up 24/7) and for some reason it's stuck on 101 status when I look at the network tab of Chrome. The text file has the current encoding progress of an audio file and I want this to be shown on my website during the "File uploaded. I am trying to use websockets to show the contents of a text file in realtime to my website.