Unable to upload files larger than 1024MB from iOS - error 413

Hi all.

Apologies for the trouble. I have spent the afternoon searching about this topic, read several 413-related topics here and on GitHub, and I believe mine might be a different scenario.

I created an issue on GitHub with several logs from my troubleshooting, but in the case it is an issue with my installation I am posting this here in case there’s any pointer for me. Apologies if that is not appropriate, but I did not see any guidance in that regard.


  • Uploading files works up to 1024MB. Then it fails.
  • I have been using NC for the last few years. I was using NC22 until a month or so ago (PHP 7.3), and now I’m on 25.0.1 (PHP 7.4). Posting it in case it’s relevant.
  • I am NOT running a reverse proxy. I run everything directly through Apache 2, manual installation. The issue is replicable when I’m in the local network, accessing directly via IP. I normally have a DDNS domain name to access when I’m on the go, but it doesn’t seem to affect this.
  • I have evidence of being able to upload (backup) videos up to 2GB size back in June. Back then we were in an older iOS app version (4.4.x) and I was on NC22.
  • I have tested it on the current App Store version as well as Testflight build. Both fail

When I try to upload the file, I get a 413 error. If it’s less than 1GB it works. I do not have chunking enabled, and would rather not have to do so, as it prevents background syncing, and my experience with it was inconsistent. I did not have it enabled in the past and it worked, so I’m hoping that either:

  • I broke something when upgrading PHP 7.3 to 7.4
  • Something broke between NC22 and NC25 (though it works on the web)
  • It’s a small issue with the iOS client, and I can help provide inputs or even troubleshoot things on my end.

The Apache logs don’t show anything strange. There are no error logs on Apache. Always reports 400 to the PUT requests.
NextCloud logs do show up an error saying that “expected XXX but wrote 0 bytes”.
Client logs show error 413, though I cannot trace it back to the server, at least directly (Apache log shows 400 and, as far as I can tell, there’s nothing else between Apache and the iOS device, though I’d be happy to get pointers here to troubleshoot things). I do not have NGINX as a proxy for NextCloud - I do have it for other services on my machine though.

I’m happy to share more details, but would love some pointers as I’m a bit lost by now and I believe you might be a lot more experienced than I am, so I appreciate any guidance you might have. I am happy to test things.

Thanks in advance for your time.

From my system:

iOS version:

Nextcloud iOS app version:
Liquid for iOS @ 2022, from TestFlight. Same happens with current App Store version.

Server operating system:
Operating System: Linux 5.10.103-v8+ aarch64
CPU: Raspberry Pi 4 Model B Rev 1.4 (4 cores)
Memory: 7.68 GB

Web server:

Type: mysql
Version: 10.3.36

PHP version:
Version: 7.4.32
Memory limit: 768 MB
Max execution time: 3600
Upload max size: 16 GB

Nextcloud version:

Ok, after installing from scratch and confirming that it didn’t work, I painstakingly went through it one by one and noticed that I hadn’t changed the default Apache LimitRequestBody value from - you guessed it, exactly 1GB - to 0 (unlimited).

Doing so fixed it.

Closed the GitHub issue, and happy to close this here, leaving the answer in case it can help someone in the future.

1 Like

Hi, My nextcloud is install on Truenas Scale, and now i’m facing the same problem like you.
would you tell me how to change the default Apache LimitRequestBody value? which file should i modi.?