ERROR : Upload file 408 : ?Solution?

Support intro

I followed this post to install Nextcloud in a FreeNAS Jail (16.0.4)
Things were all good until I attempted to upload any large file to the server in an iOS client.
I kept getting this error:
Upload file 408

Nextcloud version (16.0.4):
Operating system and version (jail FreeBSD 11.2-STABLE):
Apache (2.4.25):
PHP version (7.3.6):

Possible solution after much digging
Added this code to the end of my httpd.conf file.

<IfModule reqtimeout_module>
  RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500


See also:

Steps to replicate the error:

  1. iOS App: upload any file that takes more that ~30 seconds to upload will generate the error.
  2. Upload failed repeatedly.

The relevant output of Nextcloud log in /var/log/nextcloud/nextcloud.log:

[webdav] Fatal: Sabre\DAV\Exception\BadRequest: expected filesize 473556426 got 90472448 at <<closure>>

0. /usr/local/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php line 156
1. /usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1096
   OCA\DAV\Connector\Sabre\Directory->createFile("Video-2019.07.11--16.59.11--3557.mp4", null)
2. /usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 525
   Sabre\DAV\Server->createFile("Photos/2019/07/ ... 4", null, null)
3. <<closure>>
   Sabre\DAV\CorePlugin->httpPut(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
4. /usr/local/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
   undefinedundefinedcall_user_func_array([Sabre\DAV\CorePlugin {},"httpPut"], [Sabre\HTTP\Requ ... }])
5. /usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 479
   Sabre\Event\EventEmitter->emit("method:PUT", [Sabre\HTTP\Requ ... }])
6. /usr/local/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 254
   Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
7. /usr/local/www/nextcloud/apps/dav/appinfo/v1/webdav.php line 80
8. /usr/local/www/nextcloud/remote.php line 163
   undefinedundefinedrequire_once("/usr/local/www/ ... p")

PUT /remote.php/webdav/Photos/2019/07/Video-2019.07.11--16.59.11--3557.mp4
from 192.x.x.x by fred at 2019-08-31T04:43:28+00:00

The relevant output of the Apache log in /var/log/httpd_error.log:

(70007)The timeout specified has expired: [client] nnnnn: Error dispatching request to nnnn