Protected web socket connection dies after 30 secs - Cloudflare IPv6 issue

Sorry for the format mess up, I keep getting ‘An error occurred: Sorry, you can’t include links in your post. To share a link, click the pre-formatted text option which will add back ticks characters to the url. backtick example’.

Hello,

I've been recently developing a web application in my spare time for the past few months. After deploying it to Cloudflare I discovered a potential issue with Cloudflare proxying WebSocket connections.

My application operates a Socket.IO server [behind CF SSL] for event-based communication, and I noticed that once deployed to Cloudflare the connection dies after around 30~ seconds with the reason 'transport close'. After investigating, I found that this is an issue with Cloudflare, and only happens on IPv6 connections [at least with my ISP - BT UK].

To investigate this issue, I modified my Windows 'host' file to direct the [protected] subdomain with the socket.io server to three different IPs. the first IP was just the server's IP [without Cloudflare] which worked fine, I did this again but with an IPv4 Cloudflare IP which also worked fine. I then did an IPv6 Cloudflare IP which the disconnection issue occurs on.

To make sure this isn't just an issue with my device, I tried accessing the site on multiple devices within my own LAN, resulting in the same outcome.

Additionally what's strange is that although after a 20-second or so period, the server no longer acknowledges packets being sent from the client, yet still isn't 'dead' as it continues with socket.io's heartbeat until it gives up as it considers no response sent.

Thanks,

Jack

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.