Max Upload Size Issue

I’m aware that the max upload size is set to 100mb for free accounts, however, when ever I have Cloudflare enabled I get the dreaded 413 server error whenever I try to upload anything over 2mb to my Wordpress website. Whenever Cloudflare is disabled it works fine. Any solutions for this?

I somewhat doubt that error originates from Cloudflare. Did you check your server log files?

Do you have a public URL to reproduce it?

I don’t manage the server, but I’ve been on the phone with my hosts tech support for the past 3 hours trying to figure it out. They could find any errors related to this in the server log files. PHP settings were set properly and everything. Disabling Cloudflare was kinda of a last resort thing and it just so happened that when I disabled Cloudflare for that domain I could upload over 2mb again. The rest of my domains that still have Cloudflare active are all currently having the issue still.

Without a URL to test it is somewhat impossible to say what the reason is.

This is the closest thing I’ve got: http://organizewithlia.com/temp/

For testing it has to be an image. Upload and image under 2mb and then one over and you’ll see it will fail. It only shows the 413 error when I upload on the backend (admin menu) though so you can’t see the message I get on the front end. As soon as I disable Cloudflare this starts working.

Well, in my case it neither shows a message nor does it seem to upload anything at all. I only get a generic POST request with the following fields

image

No file data anywhere. There is a JavaScript error though, that it couldnt find jQuery. Could that simply be a script issue?

Would you feel comfortable to share the server IP address?

Hey sandro,

Thanks for your help. This is affecting all of my sites that are going through Cloudflare. I just added this to try and see if it would do something on the front end. Apparently that wasn’t a good idea.

Lets try this, if you’re up for it. I’ve created a dummy WP site on an unused domain. If you login to it with the admin credentials and try to upload a plugin thats over 2mb you’ll see the the 413 error. In my case I’m trying to upload updraftplus which can be downloaded here if you want to try: UpdraftPlus WordPress Backup Plugin – WordPress plugin | WordPress.org

Here’s the login credentials (this is an unused dummy site so you can’t mess it up):
login: https://southernale.com/admin
UN: tempAdmin
PW: r&uYjYIuRTFsaxV1

Note that my host says when they access the website locally from their servers and bypass Cloudflare they’re able to upload the file. And again when I disable or pause Cloudflare on my end it also corrects the issue. Its only when its enabled that I run into this.

Thanks again.

I tried, same 413 error, the only thing is that the error page isn’t Cloudflare’s, it’s from openresty, so I guess the provider…

You could try contacting support and making them check by bypassing CF’s from their internal network.

Hey Matteo,

Thanks for the feedback. They did do that when we were troubleshooting last night. When they bypassed CF on their end and went straight to the website on their server it uploaded fine, but when they switched to going through CF the issue started again. Also, when I disabled Cloudflare all together it resolved the issue for me. I’m at a loss.

Was this Cloudflare’s support?

It wasn’t it was my hosting provider (KnownHost).

Try contacting Cloudflare’s support, maybe they know what’s up.

https://dash.cloudflare.com/?account=support

Thanks Matteo. I just sent them a support request.

Please note that the more detailed it is, the better. Also depending on the plan level, the actual queue you are in, the load it can take a day to get a reply.

Suggestion: post the ticket # here, maybe @cloonan can take a look!

1 Like

Hi @tbrady85, I see your ticket, sorry for the issue you’re seeing. I added a link to this thread and cc’d myself on it. When you receive the auto reply from Support, can you reply and let them know you’re still encountering the issue?

Awesome. I responded. Thanks, cloonan.

1 Like

I seem to be able to confirm that. Uploading the file via Cloudflare returns the error, uploading it directly succeeds.

Do you have one single DNS record for southernale.com with an IP address ending in 211? And yes, as Matteo already mentioned the error is thrown by OpenResty. Do you have a particular Wordpress setup with some additional proxies inbetween?

Assuming you do have the correct DNS setup, my best guess at the moment would be Cloudflare is possibly changing the encoding of the uploaded file, which eventually exceeds the size limit, but that is just a wild guess and only Cloudflare’s support can really shed some light here.

I’m not sure what you mean by one single DNS record. The ip address does end in .211 but I have several A records for the domain. The www and southernale.com record are the only two being filtered through Cloudflare with the cloud logo highlighted.

The wordpress install is a clean install straight from wordpress.org so no special proxies are setup unless my host does something on their end, which they didn’t mention.

I will say that my old hosting provider didn’t have this issue with Cloudflare (I just migrated to KnownHost over the weekend) however they seem convinced that the issue isn’t with them.

Thanks for your help. Like you said, hopefully the support engineers and can help shed some light.

How many records do you have with the name southernale.com and what are their types?

No worries about the small print.

Thanks for the screenshot, though I’d recommend to remove the posting now again so that it doesnt properly leak your IP addresses.

Can you try to (temporarily) remove the AAAA for southernale.com? Back up the IPv6 address somewhere (so that you can restore it later again) and then try to upload it once more. I would not really expect it to make a difference, but maybe it is worth a try.

2 Likes