Hi @Domenico Zurlo We are sorry to hear you're facing this issue. Based on the information you shared, it seems that your WebSocket connection is being terminated by Azure due to an idle timeout
Here are some potential causes and solutions for this issue:
Idle timeout: Azure App Service has an idle timeout setting that closes connections that have been idle for a certain amount of time. This can cause WebSocket connections to be closed prematurely. To resolve this issue, you can increase the idle timeout setting. You can do this by setting the WEBSITES_CONTAINER_IDLE_TIMEOUT app setting to a higher value. The default value is 20 minutes, but you can increase it up to 1800 seconds (30 minutes)
WebSockets not enabled: By default, Azure App Service does not enable WebSockets. You need to explicitly enable WebSockets in your app. To do this, you can add the WEBSOCKETS_ENABLED app setting and set it to true. You can also enable WebSockets in the Azure portal by going to your app's Configuration > General settings > Web sockets and turning on the Web sockets switch
Firewall or proxy blocking WebSocket traffic: If your app is behind a firewall or proxy, it may be blocking WebSocket traffic. You can try adding an exception to allow WebSocket traffic through the firewall or proxy. You can also try using a different port for WebSocket traffic, as some firewalls and proxies may block traffic on certain ports