AWS Application Load Balancers (ALB) default to a 60-second idle timeout , which kills persistent WebSocket connections. Increase the ALB idle timeout to at least 3600 seconds and enable sticky sessions on the target group to maintain state.
Obviously, you must also make sure you are using HTTPS (and therefore WSS) throughout.
Well you can try turning up the logging level but not sure it will help.
This error is a network-level issue basically. An issue (or combination of issues) on the networks between your browser and the AWS host. It isn't a Node-RED issue as such.
I understood you to say that when you deploy that you see, in the browser, a connection failed popup, but you then said that you can carry on doing things. What happens to make the popup go away?
Also, open the developer tools and select the Network tab. Refresh the page and look for the entry of type websockets and see what it says. I suspect that it is not connecting.
"I can carry on doing things" - but the "popup" is at the top of the screen and stays open
Lost connection to server, reconnecting in 16s. [Try now]
As for network and web sockets .. I assume on AWS server? I don't see anything about web sockets. What ports are being used? Maybe I don't have that port open on AWS? I use port 2000 for node-red.
Websocket connections are a bit odd. They initially connect over HTTP(S) so they are on the same port as the Node-RED admin ExpressJS server (1880 by default). But they then "upgrade" their connection to WS(S). In your network tab, you should see an entry with a "101" code: