server icon indicating copy to clipboard operation
server copied to clipboard

Sabre\DAV\Exception\BadRequest: expected filesize 2584835 got 1114112

Open hume1991 opened this issue 8 years ago • 16 comments

Hello,

I have received the following fatal error messages:

Sabre\DAV\Exception\BadRequest: expected filesize 2584835 got 1114112 2018-05-13T17:43:08+0200 Sabre\DAV\Exception\BadRequest: expected filesize 61724962 got 26787840 2018-05-13T17:24:48+0200 Sabre\DAV\Exception\BadRequest: expected filesize 2707452 got 1785856 2018-05-13T16:41:51+0200 Sabre\DAV\Exception\BadRequest: expected filesize 1193422 got 884736 2018-05-13T16:30:52+0200 abre\DAV\Exception\BadRequest: expected filesize 61724962 got 4636672 2018-05-13T16:30:51+0200 Sabre\DAV\Exception\BadRequest: expected filesize 8191601 got 2326528 2018-05-13T16:19:23+0200

Currently I do not receive any of these error messages anymore.

Version 13.0.2 is used, PHP Version: 7.2.5, mysql 5.7.22.

I was informed that there are problems regarding IOS 11.3.1. App version is: 2.20.8.00003, files are displayed for synchronization, but this is not done.

Best regards

Christian Huml

hume1991 avatar May 14 '18 11:05 hume1991

I have overridden values ​​in the database, seems to work. It is a bug. INSERT INTO oc_appconfig ( appid , configkey , configvalue ) VALUES (‘files’, ‘max_chunk_size’, ‘524288000’);

hume1991 avatar May 16 '18 11:05 hume1991

Hello, I have the same issue, please can you help me with the file ant the path to modify for this issue? Thank you.

danut2006 avatar May 20 '18 22:05 danut2006

Hello danut2006,

This is done in the database. Open phpMyAdmin, search oc_appconfig Edit Value and insert.

Compare Value.

Best regards

Christian Huml

hume1991 avatar May 21 '18 20:05 hume1991

Sometimes mistakes come again. Wait for Update...

Best regards

Christian Huml

hume1991 avatar May 29 '18 12:05 hume1991

Worth noting this is sometimes caused by request_terminate_timeout being set too low in the PHP configuration if you're using PHP-FPM. What happens is if the connection is too slow for a 'chunk' of a large file to upload, PHP-FPM just shuts off the connection part way through, and you see exactly this in the log.

gregharvey avatar Jun 11 '18 14:06 gregharvey

Hello @gregharvey,

did you mean pm.max_requests?

Best regards

Christian Huml

hume1991 avatar Jun 13 '18 11:06 hume1991

I know that this issue is already closed but according to some mailing lists and a Google search it seems to be a persistent problem. It could be caused for a lot of different reasons. I'd like to mention this thread: https://central.owncloud.org/t/expected-filesize-xxx-got-yyy-0/816 (Link edited on 2020/11/13) which lists many possible reasons.

In my case it seams to be caused by Apache's reqtimeout module. I could observe sudden TCP resets sent by the server which lead me to the DoS protection mechanisms. Disabling the module eliminated the problem. Probably it is just a matter of correct settings which fit the Nextcloud server.

I'd further like to point out that I had the same problem on another Nextcloud server where we installed a web application firewall in between which in some cases terminated the sessions because of false positive signatures during the file upload. The Nextcloud server issued exactly this error message as stated within this thread and it was not obvious firsthand that it was caused by the WAF.

rahra avatar Jul 25 '18 20:07 rahra

few years still same bug .. is impossible upload big file (5gb+) with any setting .. maybe is PHP really bad chooice for this

or have working setting someone ? share then ..

Ochlup avatar Nov 13 '18 20:11 Ochlup

Since today I got the same issue. Did anybody fixed this Problem? Please help. nextcloud 15.0.2 Thx

kpleines avatar Feb 01 '19 20:02 kpleines

Also seeing this issue.

jwilczek avatar Feb 03 '19 20:02 jwilczek

Have a look at my comment from 25th of July. This probably may help you.

rahra avatar Feb 03 '19 21:02 rahra

Interesting, I am running behind a reverse proxy, not sure if it could be the root of this. But your comment definitely gives me some avenues to pursue. Thanks!

jwilczek avatar Feb 04 '19 03:02 jwilczek

Hello danut2006,

This is done in the database. Open phpMyAdmin, search oc_appconfig Edit Value and insert.

Compare Value.

Best regards

Christian Huml

Hi,

I'm seeing the same issues. Can you please explain a little further what you mean by what you've posted? If oc_appconfig is selected, there are three columns. Here is the SQL:

INSERT INTO oc_appconfig(appid, configkey, configvalue) VALUES ([value-1],[value-2],[value-3])

so, which column does "Compare Value" go into?

thanks,

ivr588 avatar Apr 13 '19 15:04 ivr588

I know that this issue is already closed but according to some mailing lists and a Google search it seems to be a persistent problem. It could be caused for a lot of different reasons. I'd like to mention this thread: https://forum.owncloud.org/viewtopic.php?f=17&t=32517 which lists many possible reasons.

In my case it seams to be caused by Apache's reqtimeout module. I could observe sudden TCP resets sent by the server which lead me to the DoS protection mechanisms. Disabling the module eliminated the problem. Probably it is just a matter of correct settings which fit the Nextcloud server.

I'd further like to point out that I had the same problem on another Nextcloud server where we installed a web application firewall in between which in some cases terminated the sessions because of false positive signatures during the file upload. The Nextcloud server issued exactly this error message as stated within this thread and it was not obvious firsthand that it was caused by the WAF.

This is to confirm that disabling Apache's reqtimeout module on Slackware 14.2 (apache-2.4.39) resolved this problem on my NC server. Thank You.

ChrisAbela avatar May 21 '19 18:05 ChrisAbela

@rahra 's advice is spot-on. When I disabled the reqtimeout_module in Apache's httpd.conf (centOS+CWP, latest version), the problem went away. Thank you very much!

jsaraiva avatar Aug 11 '19 15:08 jsaraiva

Disabling reqtimeout_module sped up my nextcloud server enormously but unfortunately did not get rid of this error when uploading via webdav

cbartondock avatar Feb 20 '21 03:02 cbartondock