cozy-labs / cozy-desktop

File Synchronisation for Cozy on Desktop and Laptop
https://cozy-labs.github.io/cozy-desktop/
GNU Affero General Public License v3.0
99 stars 45 forks source link

413 Request Entity Too Large #532

Closed 001101 closed 7 years ago

001101 commented 7 years ago

hello,

using this with cozycloud.cc account and got a 413 Request Entity Too Large on files which are only 3,8GB big.

Uploading admin.2017-02-14.tar [=================-------------] 57% 346.8s

[2017-02-19 11:46:39:736] error - Synchronize    | Error: Parsing error : Unexpected token <, body=

<html>
<head><title>413 Request Entity Too Large</title></head>
<body bgcolor="white">
<center><h1>413 Request Entity Too Large</h1></center>
<hr><center>nginx</center>
</body>
</html>

    at parseBody (/usr/lib/node_modules/cozy-desktop/node_modules/request-json-light/main.js:68:17)
    at IncomingMessage.<anonymous> (/usr/lib/node_modules/cozy-desktop/node_modules/request-json-light/main.js:364:16)
    at emitNone (events.js:72:20)
    at IncomingMessage.emit (events.js:166:7)
    at endReadableNT (_stream_readable.js:923:12)
    at nextTickCallbackWith2Args (node.js:458:9)
    at process._tickCallback `(node.js:372:17)

i have no clue about nodejs, but it looks like a module error.

how could it be resolved?

greets

sebn commented 7 years ago

Hello, thanks for the report!

I believe this is an issue on the cozy side, not really related to the desktop client. I don't know whether it's possible to configure the Cozy web server to handle larger uploads...

@clochix WDYT?

sebn commented 7 years ago

Hello again,

I got the confirmation: the maximum upload size is limited to 2Go for all the cozycloud.cc instances, and it's not possible to change it per user.

So the only workarounds I can think of are:

  1. synchronize the extracted files and folders instead of the archive
  2. split it into multiple archives
  3. self-hosting

I'm sorry I can't come up with a better solution.

sebn commented 7 years ago

Looks like the limitation could be on the node side. So workaround 3 (self-hosting) could actually not be relevant.

sebn commented 7 years ago

There could also be a limitation on the database side (in CouchDB).

001101 commented 7 years ago

thank you very much for your fast answer and effort to find a solution!

i have splited now the backup in 1.5GB files and this works, so it can be closed.

would be nice if this limitation is somewhere in cozycloud as a status page or just a simple information for users on their homepage.

sebn commented 7 years ago

I'm glad everything is working again.

Regarding the limitation, it may not exist anymore in Cozy v3. In case it still exists, we should definitely provide some user-friendly notification when adding a file that is too big to the local Cozy folder.

Thank you for your feedback!