Cloudflare limiting my own apps

Hello everyone,

A few months ago, my app was at a huge peak in requests that my api could not handle in time (the api is proxied through cloudflare as well). This caused cloudflare to actually rate limit/deny all my applications on that domain for a minute. Now, I’m not 100% sure why this happened, but I am wondering if there is something I can do with cloudflare (either settings or purchase the Pro plan?) to catch this issue before it happens again.

I am viewing the article here:

and I believe it was: “Error 1200: Cache connection limit”

I’ve been trying to optimize my server to the best of its abilities, but I am now wondering if someone knows of a better option.

Has this happened to you? Does anyone have any suggestions or know if the Pro plan increases cloudflare’s limiting?

The docs you linked to says the 1200 is because your server can’t keep up with all the requests. I don’t know why they call it a Cache Connection Limit.

Any idea how many connections per minute are coming in? Do you have a way you can load test your API? It would be interesting to try the load test with and without Cloudflare.

I must be getting somewhere around 500 requests per second to my api due to how my code is structured to retrieve data. Sadly due to the location of the servers and bouncing through proxies, load balancer, and the node, it probably adds around 300-400ms latency each call, which I know isn’t the best. Theoretically, this could scale up many more requests per second obviously if the user base grows.

I could load test my API, but it could take some time to setup and cause some disturbances to a few of my users. I don’t have a nice way of load testing yet, but I agree that would be a very good test.

Which brings me back to my original question: if I can’t compensate for the latency, and this grows, is there anything Cloudflare can do for me? Would upgrading to Pro plan work?

Or is it like you say where my server can’t keep up with the requests? I have an haproxy load balancer. Do you think it could be haproxy refusing connections after some point, some code, or is this all due to Cloudflare?

I think my next step will be to load test, but I am still interested in any input with my above questions.


The only easy Cloudflare solution I can think of is Argo, which might shave off some of the latency, but that’s a usage-based fee, so it might get really expensive for you.

If you really want to get fancy, maybe you can migrate some of the task to Workers. Again, usage-based pricing, and maybe not even possible for your specific API.

This topic was automatically closed after 30 days. New replies are no longer allowed.