PHP scripts on server hitting the 100 second timeout

Hello,

We moved to Cloudflare last Friday, and solved the problem we had with some clients that were on IPv6 only. And the firewall has been a tremendous help.

I’ve looked for a solution already, on these forums and on Google, nothing seems to work. Perhaps someone has had the same issue before and found a solution.

The problem : since yesterday, operations done on the server (like processing hundreds or thousands of photos in one go) are broken. We constantly hit the timeout Cloudflare imposes. Had we known beforehand, we wouldn’t have done the switch.

Is there some way to remove that limitation between one specific IP (the client’s) and the server’s DNS? Some way to guarantee that requests made between these two points aren’t limited?

Because right now, even though we love Cloudflare, we’re thinking of leaving, and we don’t want to spend hundreds or thousands of dollars a month just to change that limit to perhaps 600 seconds, some operations last longer than that.

Revamping the whole code isn’t a solution either, as this is our busiest time of the year.

Thanks

Please use the search. That issue has been addressed a million times.

In short, no you cant remove that limit. The best fix would be not to take that long. If that is not possible, you can only unproxy the DNS record in question or change your entire approach to something asynchronous, where you use several requests, where each of them is below that limit. But you said changing the code is not an option, so you can probably only go for unproxying.

But again, that has been discussed more than once.

I know it has been discussed, I did the search already. What we understand is that there is a timeout when there is nothing going back to the user. We tried sending back fake data, but then it corrupts the files.

So that’s what I’d like to know is, if we can keep the connection alive and reset that timeout somehow, to show CF that there is still something happening, that would be great. Like I don’t know, updating the UI and show a progress bar of some sort, returning some data every 20 seconds into an empty field, something of the sort. Would that help?

For something so freaking major, it should be right on the front page, because like I said, if we had known before, we wouldn’t have made the switch, now we’re stuck to finding out by experiencing it, and it sucks bad. So please, give me a break. You have no idea what we did before I got here, the hours we spent trying to fix this with zero results. I’m here out of desperation, not because I’m lazy.

Thank you

I am afraid no. A request cant take longer than a 100 seconds.

Simply unproxy the record in question. You wont have the proxy features in that case but your request wont time out either.

Ok. So the timeout only applies when a proxy is used then. That explains why it seems to work fine now that the DNS have been updated.

But then the IPv6 clients won’t be able to come to our site and purchase our products. All that because one ISP decided to do the switch and not tell anyone, and do a poor job of implementing this.

Thank you.

Yes, the timeout only applies to proxied connections. Otherwise Cloudflare is barely involved.

Not sure about your IPv6 remark, but you just need IPv6 on your server in this case too.

Yeah, our issue is that our server infrastructure doesn’t support IPv6 yet, so we need to use Cloudflare to accept IPv6 clients. That was a bliss until we hit the timeout issue. I just have been able to test it, it works fine now. So for now we’ll have to schedule things to turn it on and off during the day. That is, until we get out of this rush period and move to a different provider that accepts IPv6 natively. Thanks for your help, much appreciated.

In that way you are constantly changing IP address and while Cloudflare will announce the change basically instantaneously, you could run into classic DNS caching issues on the client side.

You might want to consider a proxied record for IPv6 connections and a non-proxied for all others. But that certainly depends on your overall setup. And IPv6 connections would still be subject to the 100 second timeout.

In that way you are constantly changing IP address and while Cloudflare will announce the change basically instantaneously, you could run into classic DNS caching issues on the client side.

I’m aware of that. But this is for 2 more weeks, until we can fix the problem permanently. We don’t see any other solution right now.

You might want to consider a proxied record for IPv6 connections and a non-proxied for all others. But that certainly depends on your overall setup. And IPv6 connections would still be subject to the 100 second timeout.

If we could create AAAA records, that would be swell, but that’s not possible right now. Our VM, the virtual and physical infrastructure of our current provider do not support IPv6 at all, not even tunneling.

I was not referring to creating AAAA record on your side. You can still keep IPv4 on your side.

What I was suggesting was to use one proxied DNS record, which implicitly comes with Cloudflare’s AAAA records and proxies onwards to your IPv4 host. And one one non-proxied record which points straight to your server.

Oh, I see. Is that the Pseudo IPv4 thing I’ve seen somewhere in the settings? Do you have some documentation I could read on that?

The Pseudo IPv4 setting is just part of that and simply converts an IPv6 address into something IPv4-ish. You can use that additionally, but thats not the primary idea.

All you need is IPv6 enabled on Cloudflare and a proxied and a non-proxied record. Though, as I mentioned before your IPv6 clients will still be subject to the time limit.

The Pseudo IPv4 setting is just part of that and simply converts an IPv6 address into something IPv4-ish. You can use that additionally, but thats not the primary idea.

Ok.

All you need is IPv6 enabled on Cloudflare and a proxied and a non-proxied record. Though, as I mentioned before your IPv6 clients will still be subject to the time limit.

It won’t be an issue, the clients aren’t the ones with the timeout problems, the admins who upload pictures and many other operations (us, in other words), do hit that problem.

I’ll look into this. I’m not sure how to proceed, as this is unorthodox to me. Thanks

I apologize, I’ve tried to find some documentation on this, and tried a few things, but nothing works. Perhaps I’m not using the correct keywords.

How can I have two A records with the same subdomain that points to the same IP, one proxied and one not? That doesn’t seem possible, and CF is obviously telling me it can’t be done.

I tried CNAME records and PTR, and I was not hoping it would work either, and of course it didn’t.

I do not have an IPv6 IP address, and I cannot create a new subdomain record, I have to stick with this one as it has been publicized, and the scripts on the server run only because this subdomain is used.

Am I missing something? Is this something that’s CF-only?

You cant, hence I mentioned two records with distinct names. You need different names.

That’s what I thought. We already evaluated this option, but it’s not possible, right now, it apparently requires a lot of change to the code to use a different name. Thanks.

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