Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document Size error in Docker version of document server #354

Closed
joelchittum opened this issue Apr 21, 2021 · 24 comments
Closed

Document Size error in Docker version of document server #354

joelchittum opened this issue Apr 21, 2021 · 24 comments

Comments

@joelchittum
Copy link

joelchittum commented Apr 21, 2021

Do you want to request a feature or report a bug? Bug

What is the current behavior? The document server will not open any file over 50MB

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. I setup a new copy of the document server in a docker container enabled the example in the container and tried to upload a 150MB xlsx file as well as a 100MB docx file but the error I received is Upload error

What is the expected behavior? should open the document for editing

Did this work in previous versions of DocumentServer? No I was unable to get this to work in Docker Container versions, onlyoffice/documentserver:latest, onlyoffice/documentserver:6.2.1, onlyoffice/documentserver:6.2.0, onlyoffice/documentserver:6.1

DocumentServer Docker tag: onlyoffice/documentserver:latest

Host Operating System: Manjaro 20, Centos 7

I updated the values in default.json:

"FileConverter": {
          "converter": {
                  "maxDownloadBytes": 10485760000000000,
                  "downloadTimeout": {
                          "connectionAndInactivity": "10s",
                          "wholeCycle": "2m"
                  },
                  "downloadAttemptMaxCount": 3,
                  "downloadAttemptDelay": 1000,
                  "maxprocesscount": 1,
                  "fontDir": "null",
                  "presentationThemesDir": "null",
                  "x2tPath": "null",
                  "docbuilderPath": "null",
                  "docbuilderAllFontsPath": "null",
                  "args": "",
                  "spawnOptions": {},
                  "errorfiles": "",
                  "streamWriterBufferSize": 8388608,
                  "maxRedeliveredCount": 2,
                  "inputLimits": [
                          {
                          "type": "docx;dotx;docm;dotm",
                          "zip": {
                                  "uncompressed": "500000MB",
                                  "template": "*.xml"
                          }
                          },
                          {
                          "type": "xlsx;xltx;xlsm;xltm",
                          "zip": {
                                  "uncompressed": "300000MB",
                                 "template": "*.xml"
                          }
                          },
                          {
                          "type": "pptx;ppsx;potx;pptm;ppsm;potm",
                          "zip": {
                                  "uncompressed": "500000MB",
                                  "template": "*.xml"
                          }
                          }
                  ]
          }
  }
@ShockwaveNN
Copy link
Contributor

ShockwaveNN commented Apr 21, 2021

Hi again

If you tried to upload big file via /example page of DocumentServer you should also change value of server:maxFileSize key in file /etc/onlyoffice/documentserver-example/default.json

@joelchittum
Copy link
Author

Thank you for the quick response. I updated that value and got the same result.

@ShockwaveNN
Copy link
Contributor

Could you attach your file and screenshot of error?

@joelchittum
Copy link
Author

This is a cat of the err.log:
image

This is a screenshot of the error message: image
The file I am using is too large to upload it is over 200MB

@joelchittum
Copy link
Author

Here is a download link for the excel file.
https://drive.google.com/file/d/1cczTkLnomcQax1gypDudkYg-edLb598H/view?usp=sharing

@ShockwaveNN
Copy link
Contributor

ShockwaveNN commented Apr 21, 2021

Aha, agree with you

Seems there is also limitation on nginx side

You should add client_max_body_size 1000M; in
/etc/onlyoffice/documentserver-example/nginx/includes/ds-example.conf

and I think same for all other nginx configs

Please do not forget restart it afterwards

@ShockwaveNN
Copy link
Contributor

Also I was wrong - /etc/onlyoffice/documentserver-example/production-linux.json need to be changed, not /etc/onlyoffice/documentserver-example/default.json

@ShockwaveNN
Copy link
Contributor

Aaand finally I see your file is password protected

@joelchittum
Copy link
Author

I seem to get the same error after updating the production-linux.json and nginx client_max_body_size.

@ShockwaveNN
Copy link
Contributor

Did you restarted nginx?
I was able to get to password screen with those steps
image

  1. Increase server:maxFileSize in /etc/onlyoffice/documentserver-example/production-linux.json
  2. Add client_max_body_size 1000M; to /etc/onlyoffice/documentserver-example/nginx/includes/ds-example.conf like this:
    image
  3. Change FileConverter:converter:maxDownloadBytes and 3 input in inputLimits
  4. Restart nginx and all supervisorctl restart all

@joelchittum
Copy link
Author

I followed the exact steps you have outlined in your previous post I have continued to get the same error. Is there a specific version of document server you are using.

@ShockwaveNN
Copy link
Contributor

ShockwaveNN commented Apr 21, 2021 via email

@joelchittum
Copy link
Author

Browser console error is: Failed to load resource: the server responded with a status of 413 (Request Entity Too Large)
Nginx logs: 2021/04/21 16:12:42 [error] 5974#5974: *144 client intended to send too large body: 221587234 bytes, client: 172.17.0.1, server: , request: "POST /example/upload? HTTP/1.1", host: "localhost", referrer: "http://localhost/example/"

@ShockwaveNN
Copy link
Contributor

ShockwaveNN commented Apr 21, 2021

This is decently nginx side problem, are you applied step 2 correctly?

/etc/onlyoffice/documentserver-example/nginx/includes/ds-example.conf

Show this file

@joelchittum
Copy link
Author

image

@ShockwaveNN
Copy link
Contributor

Hm, seems I've added also to default nginx config in /etc/nginx/nginx.conf

Maybe this is the reason

@joelchittum
Copy link
Author

I have now added the client max to nginx.conf and still same issue.

@ShockwaveNN
Copy link
Contributor

Ok, to be clear, I've started new container of onlyoffice/documentserver:6.2.2

And run those:

#!/usr/bin/env bash

sed -i -e 's/104857600/10485760000/g' /etc/onlyoffice/documentserver-example/production-linux.json

sed -i '9iclient_max_body_size 1000M;' /etc/onlyoffice/documentserver-example/nginx/includes/ds-example.conf
sed -i '16iclient_max_body_size 1000M;' /etc/nginx/nginx.conf

sed -i -e 's/104857600/10485760000/g' /etc/onlyoffice/documentserver/default.json
sed -i -e 's/50MB/5000MB/g' /etc/onlyoffice/documentserver/default.json
sed -i -e 's/300MB/3000MB/g' /etc/onlyoffice/documentserver/default.json

service nginx restart
supervisorctl restart all

And after that I cannot see password prompt for your file

@joelchittum
Copy link
Author

Thank you very much this worked as expected and I will close the issue now.

@ShockwaveNN
Copy link
Contributor

ShockwaveNN commented Apr 22, 2021

Didn't you find reason why previos variants are not working?

@joelchittum
Copy link
Author

I was missing some of the edits when updating the files is why it was not working for me.

@xvybihal

This comment was marked as resolved.

@ShockwaveNN

This comment was marked as resolved.

@urnash
Copy link

urnash commented Dec 7, 2022

I had a similar problem and I solved it very simply by editing
/etc/onlyoffice/documentserver/default.json

But recently I changed one ONLYOFFICE container to the same one and changed the parameters in the same way, and the solution with default.json did not help
I spent almost 2 days looking for a solution, downloaded and compared all the container files, I thought that last time I edited not only default.json, but something else
But the container configuration files were the same.
Finally a solution!!!

  1. download from our computer the file that I did not open in nextcloud
  2. delete the file in nextcloud
  3. upload back
  4. and that's it, the file starts to open

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants