Hello Cloudflare Community,
I have the problem that currently no websocket connections can be established via Cloudflare. All HTTP requests to the websocket endpoint of my website are answered with HTTP 503 Service Temporarily Unavailable
. My first thought was that the status 503 comes from my origin server. After checking the logs I can now say with confidence that the requests do not arrive at the origin server and are already rejected by the cloudflare network with status 503. The response body also contains the text error code: 1200
.
According to my research, error code 1200
means that a cache connection limit has been reached.
Source: https://developers.cloudflare.com/support/troubleshooting/cloudflare-errors/troubleshooting-cloudflare-1xxx-errors/#error-1200-cache-connection-limit
I can’t find more information about this and I don’t know what websocket connections have to do with the cloudflare cache, because websocket connections are never cached. It also says “Tune your origin webserver to accept incoming connections faster.”. My origin server is very fast and answers all requests in a few milliseconds. But due to the nature of websocket connections, they remain persistent. Therefore, the proposed solution does not make sense to me.
What currently works and fixes the problem is to turn on the development mode. The development mode deactivates the cache, which strangely makes the websocket connections work. But the development mode deactivates itself every two hours, which breaks my website again.
Here is the full request and response:
Request:
GET /socket.io/?appType=controlpage&appVersion=1.30.1&channelId=1&auth=<redacted>&instanceId=75a44bde-4e53-4590-8424-47109f629c60&origin=https%3A%2F%2Ftikfinity.zerody.one&receiveGlobalStats=true&EIO=4&transport=websocket HTTP/2
Host: tikfinity.zerody.one
Connection: Upgrade
Pragma: no-cache
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36
Upgrade: websocket
Origin: https://tikfinity.zerody.one
Sec-Websocket-Version: 13
Accept-Encoding: gzip, deflate, br
Accept-Language: de,en-US;q=0.9,en;q=0.8
Cookie: cf_clearance=U2776ZTxJLIfWcggAY.Y9ust.mY5kb1KSWOKMzni1UE-1683770592-0-160
Sec-Websocket-Key: 3uLF8/YLkThRW2aTQTrMfA==
Response:
HTTP/1.1 503 Service Temporarily Unavailable
Date: Fri, 20 Oct 2023 16:17:29 GMT
Content-Type: text/plain; charset=UTF-8
Content-Length: 16
Connection: keep-alive
Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=pcam9XI%2FMjTGKY8gOXaXk3IEj0G9OK2%2FjUT40Klg0j8f9Xf%2F4wGXqcolsH8h%2Bpk3GOeHN595RUUL%2B9Ny0bD4F5aIMtIgmCkjGeRPY2aOH0qjM5pUUohSwvYFlvyQ57rm9xpTwUPQ"}],"group":"cf-nel","max_age":604800}
NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
Vary: Accept-Encoding
X-Frame-Options: SAMEORIGIN
Referrer-Policy: same-origin
Cache-Control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Expires: Thu, 01 Jan 1970 00:00:01 GMT
X-Frame-Options: SAMEORIGIN
Server: cloudflare
CF-RAY: 819292401892bbd3-FRA
error code: 1200
I would be very happy if someone knows a solution for this.
Regards,
David