question

PradyumnaKrishna avatar image
0 Votes"
PradyumnaKrishna asked SnehaAgrawal-MSFT commented

Go Socketio gives 400 error Azure App Service

Hello everyone, I recently migrated my Python Flask-Socket.io server to Golang and I am getting an issue when I deployed my web application to Azure App Service.

I built my golang application and converted into a docker image, as I have done with my python server and deployed to Azure App Service but it is giving 400 Bad Request and 503 response while my python server works fine with the client that I am using on Azure.

111712-screen-shot-2021-07-03-at-20013-pm.png
111640-screen-shot-2021-07-03-at-20055-pm.png

Here are two contradictions,
1. The join_room event is working fine as you can see I have logged the callback Message Join Room Callback but send_message is not working,
2. This docker image is working fine on my localhost

I tried different ways to fix this by trying different CORS policies in code, checkout my Azure setting but nothing worked.
Please help me find out the solution for this.

Edit: I forgot to mention my code which you can find on my Github

azure-webapps
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Just checking in to see if the below answers helped. If this answers your query, do click “Accept Answer” and Up-Vote for the same. And, if you have any further query do let us know.

0 Votes 0 ·

1 Answer

SnehaAgrawal-MSFT avatar image
0 Votes"
SnehaAgrawal-MSFT answered

Thanks for asking question! It looks like you are running on Linux Free sku

As "Web Sockets are not currently supported for Linux apps on Free App Service Plans. We are working on removing this limitation and plan to support up to 5 web socket connections on Free App Service plans."

You may refer to this doc link: https://docs.microsoft.com/en-us/azure/app-service/faq-app-service-linux#web-sockets

Let us know if you have further query on this or issue remains.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.