Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mosquitto » Websocket connection failures
Websocket connection failures [message #1841140] Tue, 04 May 2021 16:26 Go to next message
Joel Wheeler is currently offline Joel WheelerFriend
Messages: 1
Registered: May 2021
Junior Member
Hi,

We have been running the eclipse-mosquitto 1.6.10 docker image in Google Cloud Platform for months without issue. We use both MQTT protocol and websockets. We have one Google Cloud TCP load balancer for each protocol - one running on port 443 for MQTT and one running port 9200 for websockets. They provide TLS for both connections. There is only 1 broker which both of the load balancers point to.

Last night at 19:30 BST, the broker started having timeout issues and we were unable to find the root cause. In the end, we spun up a new server with a fresh image and new load balancers. The timeout issues stopped, and regular MQTT connections are now working perfectly. However, websocket connections are now intermittently failing. The browser attempts to connect, and after a delay of ~20 seconds, either connects or fails. Even successful connections are then dropping shortly after - anywhere between 20 seconds and 8 minutes.

We have upped the Linux open file limit and have also tried upgrading to 1.6.14. Rebooting Mosquitto and the entire server doesn't fix the problem but seems to make it slightly more likely that connections succeed shortly after.

Any ideas / help would be much appreciated.

Thanks,
Joel

Re: Websocket connection failures [message #1841185 is a reply to message #1841140] Wed, 05 May 2021 23:32 Go to previous message
Roger Light is currently offline Roger LightFriend
Messages: 90
Registered: September 2013
Member
Hi Joel,

Normally with this kind of report I'd be asking about what version of libwebsockets you are using, and to make sure that it is compiled with external poll support, but if you're using the official docker image and haven't changed the image, then that should be a moot point. That means I'm at a bit of a loss to suggest anything. How many connections are you running, and what sort of message rate? Perhaps the better question is - is the broker overloaded with what you're doing? There are big performance improvements in version 2.0, so swapping to that may be an option to consider. You mention your load balancers are providing TLS - you mean TLS termination, so the broker doesn't see the TLS load? If not then moving TLS to the load balancers will give you more CPU headroom to play with on the broker.

Regards,

Roger
Previous Topic:Mosquitto bridge reconnection
Next Topic:How to use only bridges without listener
Goto Forum:
  


Current Time: Thu Apr 25 00:44:08 GMT 2024

Powered by FUDForum. Page generated in 0.02697 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top